/* ============================================================
   Filminfo — publikus frontend
   Világos, modern, "cinema" hangulat, arany kiemeléssel
   ============================================================ */

:root {
    --bg:            #f4f6f9;
    --surface:       #ffffff;
    --surface-2:     #eef1f6;
    --ink:           #15181f;
    --muted:         #5c6675;
    --line:          #e4e7ee;

    --brand:         #0d1424;
    --brand-2:       #16203a;
    --brand-ink:     #eef2fb;

    --accent:        #ffc21f;
    --accent-strong: #f0a500;
    --accent-ink:    #3a2b00;

    --star:          #f5b301;
    --good:          #23a559;

    --radius:        14px;
    --radius-sm:     9px;
    --shadow:        0 8px 28px rgba(16, 22, 40, .10);
    --shadow-sm:     0 3px 10px rgba(16, 22, 40, .08);

    --maxw:          1200px;
    --font:          "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------------------------- Header ---------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
    color: var(--brand-ink);
    box-shadow: 0 2px 16px rgba(8, 12, 24, .35);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -.02em;
    white-space: nowrap;
}
.logo .mark {
    display: inline-grid;
    place-items: center;
    width: 34px; height: 34px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 9px;
    font-size: 1.15rem;
}
.logo .hl { color: var(--accent); }

.main-nav {
    display: flex;
    gap: 6px;
    margin-left: 4px;
}
.main-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .95rem;
    color: #c7d0e4;
    transition: background .15s, color .15s;
}
.main-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* --------------------------- Search ----------------------------- */

.search {
    position: relative;
    margin-left: auto;
    flex: 1 1 420px;
    max-width: 480px;
}
.search input {
    width: 100%;
    height: 42px;
    padding: 0 44px 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: .96rem;
    outline: none;
    transition: background .15s, box-shadow .15s;
}
.search input::placeholder { color: #a9b4cc; }
.search input:focus {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 0 0 4px rgba(255, 194, 31, .35);
}
.search input:focus::placeholder { color: var(--muted); }
.search .ico {
    position: absolute;
    right: 15px; top: 50%;
    transform: translateY(-50%);
    color: #a9b4cc;
    pointer-events: none;
}
.search input:focus ~ .ico { color: var(--accent-strong); }

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    transition: background .12s;
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover,
.search-results a.active { background: var(--surface-2); }
.search-results img,
.search-results .noimg {
    width: 40px; height: 58px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--surface-2);
    flex: none;
}
.search-results .sr-t { font-weight: 650; font-size: .93rem; line-height: 1.25; }
.search-results .sr-m { font-size: .8rem; color: var(--muted); }
.search-results .sr-empty { padding: 18px; text-align: center; color: var(--muted); }

/* --------------------------- Buttons ---------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 650;
    font-size: .95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .12s, box-shadow .15s, background .15s;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-accent:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent-strong); }

/* ---------------------------- Hero ------------------------------ */

.hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    background: var(--brand);
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center 20%;
    filter: saturate(1.1);
}
.hero-bg::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(10,15,28,.94) 0%, rgba(10,15,28,.72) 45%, rgba(10,15,28,.35) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(10,15,28,0) 30%);
}
.hero-inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 30px;
    min-height: 420px;
    padding: 48px 0 56px;
}
.hero-poster {
    width: 190px;
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0,0,0,.5);
    flex: none;
}
.hero-copy { max-width: 640px; }
.hero .badge-type {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.hero h1 { font-size: 2.7rem; line-height: 1.06; letter-spacing: -.02em; margin-bottom: 12px; }
.hero .hero-meta { color: #d3dae9; font-weight: 500; margin-bottom: 14px; }
.hero .hero-meta .star { color: var(--star); font-weight: 700; }
.hero p.lead { color: #c5cddd; font-size: 1.02rem; margin-bottom: 22px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------- Section / rows ----------------------- */

section.block { padding: 38px 0; }
.block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}
.block-head h2 {
    font-size: 1.4rem;
    letter-spacing: -.01em;
    position: relative;
    padding-left: 14px;
}
.block-head h2::before {
    content: "";
    position: absolute; left: 0; top: 3px; bottom: 3px;
    width: 5px; border-radius: 3px;
    background: var(--accent);
}
.block-head a.more { color: var(--muted); font-weight: 600; font-size: .9rem; }
.block-head a.more:hover { color: var(--accent-strong); }

/* --------------------------- Poster grid ------------------------ */

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 22px 18px;
}
.card { display: block; }
.card .poster {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s;
}
.card:hover .poster { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .poster img { width: 100%; height: 100%; object-fit: cover; }
.card .poster .noimg {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: var(--muted); font-size: 2rem;
}
.card .rating {
    position: absolute;
    top: 9px; left: 9px;
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(13, 20, 36, .85);
    color: #fff;
    font-weight: 700; font-size: .8rem;
    padding: 4px 8px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.card .rating .s { color: var(--star); }
.card .tag-type {
    position: absolute;
    top: 9px; right: 9px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700; font-size: .68rem;
    letter-spacing: .05em; text-transform: uppercase;
    padding: 3px 7px; border-radius: 6px;
}
.card .c-title {
    margin-top: 9px;
    font-weight: 650;
    font-size: .95rem;
    line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .c-sub { color: var(--muted); font-size: .84rem; margin-top: 1px; }
.card:hover .c-title { color: var(--accent-strong); }

/* --------------------------- Detail page ------------------------ */

.detail-hero { position: relative; background: var(--brand); color: #fff; overflow: hidden; }
.detail-hero .bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center 25%;
}
.detail-hero .bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(11,16,30,.96), rgba(11,16,30,.75) 55%, rgba(11,16,30,.5));
}
.detail-hero .inner {
    position: relative;
    display: flex;
    gap: 34px;
    padding: 44px 0;
}
.detail-poster {
    width: 250px; flex: none;
    border-radius: var(--radius);
    box-shadow: 0 18px 44px rgba(0,0,0,.55);
}
.detail-poster.noimg { aspect-ratio: 2/3; display: grid; place-items: center; background: var(--brand-2); font-size: 3rem; color: #7a86a0; }
.detail-main { min-width: 0; }
.detail-main h1 { font-size: 2.4rem; line-height: 1.08; letter-spacing: -.02em; }
.detail-main .orig { color: #b9c2d6; font-size: 1.05rem; margin-top: 4px; font-style: italic; }
.meta-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    margin: 16px 0;
    color: #d3dae9; font-weight: 500;
}
.meta-row .dot { width: 4px; height: 4px; border-radius: 50%; background: #7b869c; }
.rating-big {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.1);
    padding: 6px 12px; border-radius: 999px;
    font-weight: 700;
}
.rating-big .s { color: var(--star); font-size: 1.1rem; }
.rating-big small { color: #aab4ca; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 20px; }
.chip {
    background: rgba(255,255,255,.12);
    color: #eaf0fb;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: .86rem; font-weight: 600;
    transition: background .15s;
}
a.chip:hover { background: var(--accent); color: var(--accent-ink); }

.tagline { font-style: italic; color: #c8d0e2; margin-bottom: 14px; }
.overview { color: #e7ebf4; max-width: 720px; font-size: 1.02rem; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* content sections below hero */
.detail-body { padding: 36px 0 50px; }
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.subhead { font-size: 1.25rem; margin: 4px 0 16px; padding-left: 12px; position: relative; }
.subhead::before { content:""; position:absolute; left:0; top:4px; bottom:4px; width:5px; border-radius:3px; background:var(--accent); }

/* cast */
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px; }
.cast-card { text-align: center; }
.cast-card .ph {
    width: 92px; height: 92px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 8px;
    background: var(--surface-2); box-shadow: var(--shadow-sm);
    display: grid; place-items: center; color: var(--muted); font-size: 1.4rem;
}
.cast-card .nm { font-weight: 650; font-size: .9rem; line-height: 1.2; }
.cast-card .ch { color: var(--muted); font-size: .82rem; }
.cast-card:hover .nm { color: var(--accent-strong); }

/* trailer */
.trailer-frame {
    position: relative; width: 100%; aspect-ratio: 16/9;
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
    background: #000; border: 0;
}

/* sidebar info */
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; box-shadow: var(--shadow-sm); }
.info-card .row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-card .row:last-child { border-bottom: 0; }
.info-card .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.info-card .v { font-weight: 550; }
.info-card .v a:hover { color: var(--accent-strong); }

/* watch links */
.watch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.watch-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; padding: 7px 14px 7px 8px;
    font-weight: 600; font-size: .9rem;
    box-shadow: var(--shadow-sm); transition: border-color .15s, transform .12s;
}
.watch-pill:hover { border-color: var(--accent-strong); transform: translateY(-1px); }
.watch-pill img { width: 26px; height: 26px; border-radius: 7px; }
.watch-pill .badge { font-size: .72rem; color: var(--muted); font-weight: 600; }

/* --------------------------- Page head -------------------------- */

.page-head { padding: 34px 0 6px; }
.page-head h1 { font-size: 2rem; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* --------------------------- Footer ----------------------------- */

.site-footer {
    margin-top: 40px;
    background: var(--brand);
    color: #aeb8ce;
    padding: 34px 0;
    font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.site-footer .logo { font-size: 1.2rem; color: #fff; }
.site-footer a:hover { color: var(--accent); }
.site-footer .tmdb-note { max-width: 480px; font-size: .8rem; color: #7f8aa3; }

/* --------------------------- Empty ------------------------------ */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* --------------------------- Responsive ------------------------- */
@media (max-width: 780px) {
    .main-nav { display: none; }
    .site-header .wrap { gap: 12px; }
    .search { flex-basis: 200px; }
    .hero-inner { flex-direction: column; align-items: flex-start; min-height: 0; padding: 32px 0 40px; }
    .hero-poster { width: 130px; }
    .hero h1 { font-size: 2rem; }
    .detail-hero .inner { flex-direction: column; }
    .detail-poster { width: 170px; }
    .detail-main h1 { font-size: 1.8rem; }
}
