/* ==========================================================================
   Filmų bazė – viešoji dalis
   Spalvos valdomos CSS kintamaisiais – tema „Filmų bazė“ juos perrašo.
   ========================================================================== */

:root {
	--fb-gold: #d4af37;
	--fb-gold-light: #f1d67e;
	--fb-gold-dark: #9c7a22;
	--fb-gold-grad: linear-gradient(135deg, #f6e19a 0%, #d4af37 45%, #a8862a 100%);
	--fb-hero-bg: #060606;
	--fb-hero-text: #f6f2e7;
	--fb-hero-muted: #a8a196;
	--fb-bg: #f7f5f0;
	--fb-surface: #ffffff;
	--fb-surface-2: #fbfaf6;
	--fb-text: #16140f;
	--fb-muted: #6d685e;
	--fb-border: #e9e4d7;
	--fb-star-off: #ddd6c4;
	--fb-shadow: 0 1px 2px rgba(20, 16, 4, .04), 0 8px 28px rgba(20, 16, 4, .07);
	--fb-shadow-lg: 0 30px 70px rgba(0, 0, 0, .45);
	--fb-radius: 14px;
	--fb-radius-sm: 8px;
	--fb-container: 1200px;
	--fb-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

.fb-container { width: 100%; max-width: var(--fb-container); margin-inline: auto; padding-inline: 24px; box-sizing: border-box; }
.fb-muted { color: var(--fb-muted); }
.fb-small { font-size: .875rem; }

/* ---------- Hero ---------- */
.fb-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--fb-hero-bg);
	color: var(--fb-hero-text);
	padding: 64px 0 56px;
}
.fb-hero::before {
	content: "";
	position: absolute;
	inset: -40px;
	z-index: -2;
	background-image: var(--fb-backdrop, none);
	background-size: cover;
	background-position: center 25%;
	filter: blur(38px) saturate(1.1);
	opacity: .32;
	transform: scale(1.1);
}
.fb-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(900px 380px at 85% -10%, rgba(212, 175, 55, .22), transparent 60%),
		radial-gradient(600px 300px at 0% 110%, rgba(212, 175, 55, .10), transparent 60%),
		linear-gradient(180deg, rgba(6, 6, 6, .25) 0%, rgba(6, 6, 6, .85) 100%);
}
.fb-hero--single { padding: 72px 0 64px; min-height: 300px; display: flex; align-items: flex-end; }
.fb-hero--single .fb-hero__inner { padding-right: calc(340px + 48px); }
.fb-hero__inner { position: relative; }
.fb-hero__sub { color: var(--fb-hero-muted); margin: 10px 0 0; font-size: 1.05rem; }

.fb-crumbs { display: flex; gap: 8px; align-items: center; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fb-hero-muted); margin-bottom: 14px; }
.fb-crumbs a { color: var(--fb-gold); text-decoration: none; }
.fb-crumbs a:hover { color: var(--fb-gold-light); }

.fb-title {
	font-family: var(--fb-font-display);
	font-weight: 700;
	font-size: clamp(2.3rem, 5.6vw, 4.4rem);
	line-height: 1.04;
	letter-spacing: -.015em;
	margin: 0;
	color: #fff;
	text-wrap: balance;
}
.fb-title::after {
	content: "";
	display: block;
	width: 72px;
	height: 3px;
	margin-top: 20px;
	background: var(--fb-gold-grad);
	border-radius: 2px;
}
.fb-hero__meta { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 20px; }

.fb-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-genre {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid rgba(212, 175, 55, .55);
	border-radius: 999px;
	color: var(--fb-gold-light);
	font-size: .82rem;
	letter-spacing: .04em;
	text-decoration: none;
	transition: background .2s, color .2s;
}
a.fb-genre:hover { background: var(--fb-gold); color: #000; }

.fb-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fb-imdb, .fb-user-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px 5px 5px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .12);
	color: var(--fb-hero-text);
	text-decoration: none;
	font-size: .9rem;
	backdrop-filter: blur(6px);
}
.fb-imdb:hover { border-color: #f5c518; }
.fb-imdb__logo { background: #f5c518; color: #000; font-weight: 900; font-size: .78rem; padding: 3px 7px; border-radius: 4px; letter-spacing: -.02em; }
.fb-imdb__score strong, .fb-user-badge strong { font-size: 1.1rem; color: #fff; margin-right: 1px; }
.fb-imdb__votes, .fb-user-badge__count { color: var(--fb-hero-muted); font-size: .8rem; }
.fb-user-badge { padding-left: 10px; }
.fb-user-badge__star { color: var(--fb-gold); font-size: 1.1rem; }

/* ---------- Filmo / aktoriaus turinys ---------- */
.fb-film__body { padding-bottom: 72px; }
.fb-film__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 48px;
	align-items: start;
}
.fb-film__intro { padding-top: 40px; min-width: 0; }
.fb-film__poster { margin-top: -220px; position: relative; z-index: 2; }
.fb-poster, .fb-film__poster img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: var(--fb-radius);
	box-shadow: var(--fb-shadow-lg);
	outline: 1px solid rgba(212, 175, 55, .35);
	outline-offset: -1px;
}
.fb-film__poster--portrait .fb-poster, .fb-film__poster--portrait img { aspect-ratio: 4 / 5; }

.fb-lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.7; margin: 0 0 28px; color: var(--fb-text); }

.fb-facts { display: grid; gap: 0; margin: 0 0 28px; border-top: 1px solid var(--fb-border); }
.fb-facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--fb-border); }
.fb-facts dt { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fb-gold-dark); font-weight: 700; padding-top: 3px; }
.fb-facts dd { margin: 0; }
.fb-facts a { color: inherit; text-decoration: underline; text-decoration-color: var(--fb-gold); text-underline-offset: 3px; }
.fb-facts a:hover { color: var(--fb-gold-dark); }

.fb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 999px;
	border: 0;
	background: var(--fb-gold-grad);
	color: #120f05 !important;
	font-weight: 700;
	font-size: .95rem;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(212, 175, 55, .28);
	transition: transform .15s, box-shadow .15s, filter .15s;
}
.fb-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(212, 175, 55, .38); filter: brightness(1.05); }
.fb-btn--ghost { background: transparent; color: var(--fb-text) !important; border: 1px solid var(--fb-border); box-shadow: none; }
.fb-btn--ghost:hover { border-color: var(--fb-gold); box-shadow: none; }

.fb-section { margin-top: 64px; }
.fb-section__title {
	font-family: var(--fb-font-display);
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	font-weight: 700;
	margin: 0 0 24px;
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--fb-text);
}
.fb-section__title::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--fb-gold-grad); }
.fb-film__intro > .fb-section__title { margin-top: 0; }
.fb-count { font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 700; background: var(--fb-text); color: var(--fb-gold-light); border-radius: 999px; padding: 3px 10px; }

.fb-content { font-size: 1.06rem; line-height: 1.8; max-width: 760px; }
.fb-content > *:first-child { margin-top: 0; }
.fb-content img { max-width: 100%; height: auto; border-radius: var(--fb-radius-sm); }
.fb-content a { color: var(--fb-gold-dark); }
.fb-bio { max-width: none; }

/* ---------- Kortelės ---------- */
.fb-grid { display: grid; gap: 28px 22px; }
.fb-grid--films { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.fb-grid--actors { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.fb-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.fb-card__media {
	position: relative;
	display: block;
	border-radius: var(--fb-radius);
	overflow: hidden;
	background: #111;
	box-shadow: var(--fb-shadow);
	transition: transform .25s ease, box-shadow .25s ease;
}
.fb-card__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); transition: box-shadow .25s; pointer-events: none; }
.fb-card:hover .fb-card__media { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 16, 4, .18); }
.fb-card:hover .fb-card__media::after { box-shadow: inset 0 0 0 2px var(--fb-gold); }
.fb-card__img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .5s ease; }
.fb-card--actor .fb-card__img { aspect-ratio: 4 / 5; }
.fb-card:hover .fb-card__img { transform: scale(1.04); }
.fb-card__imdb {
	position: absolute;
	left: 10px;
	top: 10px;
	background: rgba(6, 6, 6, .82);
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 6px;
	backdrop-filter: blur(4px);
}
.fb-card__imdb b { color: #f5c518; font-weight: 900; margin-right: 2px; }
.fb-card__body { padding: 12px 2px 0; }
.fb-card__title { font-size: 1rem; line-height: 1.3; margin: 0; font-weight: 700; }
.fb-card__title a { color: var(--fb-text); text-decoration: none; }
.fb-card__title a:hover { color: var(--fb-gold-dark); }
.fb-card__meta { margin: 4px 0 0; font-size: .84rem; color: var(--fb-muted); }
.fb-card__rating { margin: 6px 0 0; font-size: .85rem; display: flex; align-items: center; gap: 6px; color: var(--fb-muted); }

.fb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 2 / 3;
	background: radial-gradient(circle at 50% 35%, #2a2414 0%, #0b0b0b 70%);
	border-radius: inherit;
}
.fb-placeholder--actor { aspect-ratio: 4 / 5; }
.fb-placeholder svg { width: 34%; max-width: 90px; fill: none; stroke: var(--fb-gold); stroke-width: 1.2; opacity: .7; }
.fb-film__poster .fb-placeholder { border-radius: var(--fb-radius); box-shadow: var(--fb-shadow-lg); }

/* ---------- Žvaigždutės ---------- */
.fb-stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 1px; white-space: nowrap; font-size: 1em; }
.fb-stars__base { color: var(--fb-star-off); }
.fb-stars__fill { position: absolute; inset: 0 auto 0 0; width: var(--fb-pct, 0%); overflow: hidden; color: var(--fb-gold); }

.fb-star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.fb-star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fb-star-input label, .fb-star-btn {
	font-size: 1.7rem;
	line-height: 1;
	color: var(--fb-star-off);
	cursor: pointer;
	background: none;
	border: 0;
	padding: 2px;
	transition: color .12s, transform .12s;
}
.fb-star-input--lg .fb-star-btn { font-size: 2.4rem; }
.fb-star-btn.is-on,
.fb-star-input input:checked ~ label { color: var(--fb-gold); }
.fb-star-input:hover .fb-star-btn,
.fb-star-input:hover label { color: var(--fb-star-off); }
.fb-star-input .fb-star-btn:hover,
.fb-star-input .fb-star-btn:hover ~ .fb-star-btn,
.fb-star-input label:hover,
.fb-star-input label:hover ~ label { color: var(--fb-gold-light); }
.fb-star-btn:hover, .fb-star-input label:hover { transform: scale(1.12); }
.fb-star-input input:focus-visible + label, .fb-star-btn:focus-visible { outline: 2px solid var(--fb-gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Vertinimo blokas ---------- */
.fb-rating {
	display: grid;
	grid-template-columns: auto minmax(180px, 1fr) auto;
	gap: 40px;
	align-items: center;
	padding: 32px;
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: var(--fb-radius);
	box-shadow: var(--fb-shadow);
}
.fb-rating.is-loading { opacity: .65; pointer-events: none; }
.fb-rating__summary { text-align: center; min-width: 140px; }
.fb-rating__big { font-family: var(--fb-font-display); line-height: 1; }
.fb-rating__avg { font-size: 3.6rem; font-weight: 700; color: var(--fb-text); }
.fb-rating__max { font-size: 1.2rem; color: var(--fb-muted); margin-left: 2px; }
.fb-rating__stars { font-size: 1.3rem; margin: 8px 0 6px; }
.fb-rating__count { font-size: .85rem; color: var(--fb-muted); }
.fb-rating__dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fb-rating__dist li { display: grid; grid-template-columns: 36px 1fr 32px; gap: 10px; align-items: center; font-size: .82rem; color: var(--fb-muted); }
.fb-rating__bar { height: 8px; background: var(--fb-surface-2); border: 1px solid var(--fb-border); border-radius: 999px; overflow: hidden; }
.fb-rating__bar span { display: block; height: 100%; background: var(--fb-gold-grad); border-radius: inherit; transition: width .4s ease; }
.fb-rating__dist-count { text-align: right; }
.fb-rating__vote { text-align: center; padding-left: 40px; border-left: 1px solid var(--fb-border); }
.fb-rating__prompt { margin: 0 0 6px; font-weight: 600; }
.fb-rating__msg { min-height: 1.4em; margin: 6px 0 0; font-size: .88rem; color: var(--fb-muted); }
.fb-rating__msg.is-success { color: #3d7b2e; }
.fb-rating__msg.is-error { color: #b3261e; }

/* ---------- Komentarai ---------- */
.fb-comments .comment-respond {
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: var(--fb-radius);
	padding: 28px;
	box-shadow: var(--fb-shadow);
	margin-bottom: 36px;
}
.fb-comments__form-title { font-size: 1.15rem; margin: 0 0 6px; display: flex; justify-content: space-between; gap: 12px; }
.fb-comments__form-title small a { font-size: .85rem; font-weight: 400; color: var(--fb-muted); }
.fb-comments form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.fb-comments form > * { grid-column: 1 / -1; }
.fb-comments .comment-form-author { grid-column: 1; }
.fb-comments .comment-form-email { grid-column: 2; }
.fb-comments label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.fb-comments input[type=text], .fb-comments input[type=email], .fb-comments input[type=url], .fb-comments textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid var(--fb-border);
	border-radius: var(--fb-radius-sm);
	background: var(--fb-surface-2);
	color: var(--fb-text);
	font: inherit;
	transition: border-color .15s, box-shadow .15s;
}
.fb-comments input:focus, .fb-comments textarea:focus { outline: 0; border-color: var(--fb-gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .2); }
.fb-comments .comment-form-cookies-consent label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.fb-comments .form-submit { margin: 8px 0 0; }
.fb-comment-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 14px; padding: 12px 16px; background: var(--fb-surface-2); border: 1px dashed var(--fb-border); border-radius: var(--fb-radius-sm); }
.fb-comment-rating__label { font-weight: 600; font-size: .9rem; }
.fb-comment-rating__hint { font-size: .8rem; color: var(--fb-muted); }

.fb-comment-list, .fb-comment-list .children { list-style: none; margin: 0; padding: 0; }
.fb-comment-list .children { margin-left: 56px; }
.fb-comment__inner { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--fb-border); }
.fb-comment__avatar img { border-radius: 50%; display: block; outline: 2px solid rgba(212, 175, 55, .4); outline-offset: 2px; }
.fb-comment__main { flex: 1; min-width: 0; }
.fb-comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fb-comment__author { font-size: 1rem; }
.fb-comment__date { font-size: .8rem; color: var(--fb-muted); text-decoration: none; }
.fb-comment__pending { font-size: .85rem; color: var(--fb-gold-dark); margin: 6px 0; }
.fb-comment__text { margin-top: 6px; line-height: 1.7; }
.fb-comment__text p { margin: 0 0 .7em; }
.fb-comment-stars { display: flex; align-items: center; gap: 6px; font-size: .95rem; margin-bottom: 4px; color: var(--fb-muted); }
.fb-comment-stars span:last-child { font-size: .8rem; }
.fb-comment__foot { font-size: .84rem; }
.fb-comment__foot a { color: var(--fb-gold-dark); text-decoration: none; font-weight: 600; }

/* ---------- Archyvai ---------- */
.fb-hero--archive { padding: 72px 0 60px; }
.fb-archive { padding-top: 36px; padding-bottom: 72px; }
.fb-toolbar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.fb-chip { padding: 7px 14px; border: 1px solid var(--fb-border); border-radius: 999px; font-size: .85rem; color: var(--fb-text); text-decoration: none; background: var(--fb-surface); transition: all .15s; }
.fb-chip:hover { border-color: var(--fb-gold); }
.fb-chip.is-active { background: var(--fb-text); color: var(--fb-gold-light); border-color: var(--fb-text); }
.fb-sort { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--fb-muted); }
.fb-sort select, .fb-search-inline input {
	padding: 9px 14px;
	border: 1px solid var(--fb-border);
	border-radius: 999px;
	background: var(--fb-surface);
	color: var(--fb-text);
	font: inherit;
}
.fb-search-inline input { min-width: 260px; }
.fb-empty { padding: 60px 0; text-align: center; color: var(--fb-muted); }
.fb-pagination { margin-top: 48px; }
.fb-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fb-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--fb-border); border-radius: 999px; text-decoration: none; color: var(--fb-text); background: var(--fb-surface); }
.fb-pagination .page-numbers.current { background: var(--fb-text); color: var(--fb-gold-light); border-color: var(--fb-text); }

/* ---------- Prisitaikymas ---------- */
@media (max-width: 960px) {
	.fb-hero--single .fb-hero__inner { padding-right: 24px; }
	.fb-hero--single { min-height: 0; padding: 48px 0 140px; }
	.fb-film__top { grid-template-columns: 1fr; gap: 0; }
	.fb-film__poster { order: -1; margin: -120px auto 0; width: min(260px, 70%); }
	.fb-film__intro { padding-top: 32px; }
	.fb-rating { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
	.fb-rating__vote { padding-left: 0; border-left: 0; border-top: 1px solid var(--fb-border); padding-top: 20px; }
}
@media (max-width: 600px) {
	.fb-container { padding-inline: 16px; }
	.fb-grid--films { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
	.fb-grid--actors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
	.fb-facts > div { grid-template-columns: 90px 1fr; }
	.fb-comments form { grid-template-columns: 1fr; }
	.fb-comments .comment-form-author, .fb-comments .comment-form-email { grid-column: 1; }
	.fb-comments .comment-respond { padding: 20px; }
	.fb-comment-list .children { margin-left: 20px; }
	.fb-search-inline, .fb-search-inline input { width: 100%; min-width: 0; }
	.fb-star-input--lg .fb-star-btn { font-size: 2.1rem; }
}

/* Komentaro formos žvaigždutės – neperimti formos label stiliaus */
.fb-comments .fb-star-input label { display: inline-block; font-size: 1.7rem; font-weight: 400; margin: 0; }
.fb-comments .fb-comment-rating__label { margin: 0; }

/* ---------- Originalus pavadinimas, Rotten Tomatoes ---------- */
.fb-original-title { margin: 14px 0 0; color: var(--fb-hero-muted); font-size: 1.05rem; font-style: italic; letter-spacing: .01em; }
.fb-title:has(+ .fb-original-title)::after { margin-top: 0; height: 0; }
.fb-original-title::after { content: ""; display: block; width: 72px; height: 3px; margin-top: 18px; background: var(--fb-gold-grad); border-radius: 2px; }
.fb-rt {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px 5px 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .12);
	color: var(--fb-hero-text);
	text-decoration: none;
	font-size: .9rem;
	backdrop-filter: blur(6px);
}
a.fb-rt:hover { border-color: #fa320a; }
.fb-rt-icon { width: 22px; height: 22px; display: block; }
.fb-rt__score { display: inline-flex; align-items: baseline; gap: 6px; }
.fb-rt__score strong { font-size: 1.1rem; color: #fff; }
.fb-rt__label { color: var(--fb-hero-muted); font-size: .78rem; }
.fb-rt.is-certified { border-color: rgba(250, 50, 10, .55); }
.fb-card__scores { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fb-card__scores .fb-card__imdb { position: static; }
.fb-card__rt { display: inline-flex; align-items: center; gap: 3px; }
.fb-card__rt .fb-rt-icon { width: 14px; height: 14px; }
