* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #1c1917;
    color: #f5f5f4;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

.container,
.nav-shell,
.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(28, 25, 23, 0.94);
    border-bottom: 1px solid rgba(120, 113, 108, 0.28);
    backdrop-filter: blur(16px);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    font-weight: 900;
    font-size: 20px;
    background: linear-gradient(135deg, #d97706, #44403c 70%);
    box-shadow: 0 12px 32px rgba(217, 119, 6, 0.28);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-2deg);
}

.brand-text strong {
    display: block;
    color: #fef3c7;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    display: block;
    color: #a8a29e;
    font-size: 12px;
    margin-top: -2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.site-nav > a,
.nav-dropdown > button {
    padding: 10px 14px;
    color: #d6d3d1;
    border-radius: 12px;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav > a:hover,
.nav-dropdown > button:hover,
.site-nav > a.active {
    color: white;
    background: #d97706;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 220px;
    padding: 10px;
    background: rgba(41, 37, 36, 0.98);
    border: 1px solid rgba(120, 113, 108, 0.35);
    border-radius: 16px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
    display: none;
}

.dropdown-panel.is-open {
    display: grid;
}

.dropdown-panel a {
    padding: 10px 12px;
    color: #d6d3d1;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    background: #44403c;
    color: white;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
    margin-left: 8px;
}

.nav-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    color: white;
    background: #292524;
    border: 1px solid #57534e;
    border-radius: 14px;
    padding: 11px 14px;
    outline: none;
}

.nav-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.nav-search button,
.primary-btn {
    color: white;
    background: #d97706;
    border-radius: 14px;
    padding: 11px 18px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.primary-btn:hover {
    background: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.ghost-btn {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(253, 230, 138, 0.26);
    border-radius: 14px;
    padding: 10px 16px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    color: white;
    border-radius: 12px;
    background: #44403c;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 540px;
    overflow: hidden;
    background: #0c0a09;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.7) 42%, rgba(28, 25, 23, 0.15) 100%), linear-gradient(0deg, #1c1917 0%, rgba(28, 25, 23, 0) 42%);
}

.hero-content {
    position: absolute;
    left: max(16px, calc((100vw - 1240px) / 2));
    bottom: 76px;
    width: min(700px, calc(100% - 32px));
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: white;
    background: #d97706;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    color: white;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-info p {
    margin: 0;
    color: #e7e5e4;
    font-size: clamp(16px, 2vw, 20px);
    max-width: 760px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 20px;
}

.hero-tags span,
.tag-row span,
.compact-tags span {
    color: #fde68a;
    background: rgba(120, 113, 108, 0.38);
    border: 1px solid rgba(253, 230, 138, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 54px;
    background: #f59e0b;
}

.content-section {
    padding: 72px 0;
    background: #1c1917;
}

.section-alt {
    background: linear-gradient(180deg, #292524, #1c1917);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-head h2 {
    margin: 12px 0 6px;
    color: white;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    color: #a8a29e;
}

.section-head a {
    color: #fbbf24;
    font-weight: 800;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-grid,
.archive-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    background: #292524;
    border: 1px solid rgba(120, 113, 108, 0.22);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0c0a09;
}

.movie-card-large .poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.05) 56%);
}

.card-badge,
.card-year {
    position: absolute;
    z-index: 2;
    color: white;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    top: 12px;
    left: 12px;
    background: #d97706;
}

.card-year {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.62);
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover {
    color: #fbbf24;
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 14px;
    color: #a8a29e;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 34px;
    align-items: start;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.split-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item a {
    display: grid;
    grid-template-columns: 48px 76px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    color: white;
    background: rgba(68, 64, 60, 0.7);
    border: 1px solid rgba(120, 113, 108, 0.25);
    border-radius: 16px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item a:hover {
    transform: translateX(4px);
    background: rgba(120, 113, 108, 0.34);
}

.rank-num {
    color: #fbbf24;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 76px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    line-height: 1.35;
}

.rank-text em {
    color: #a8a29e;
    font-size: 13px;
    font-style: normal;
    margin-top: 4px;
}

.spotlight-card {
    overflow: hidden;
    background: #0c0a09;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.spotlight-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.spotlight-card div {
    padding: 24px;
}

.spotlight-card span {
    color: #fbbf24;
    font-weight: 800;
}

.spotlight-card h2 {
    margin: 10px 0;
    font-size: 26px;
}

.spotlight-card p {
    color: #d6d3d1;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(217, 119, 6, 0.28), transparent 38%), linear-gradient(135deg, #0c0a09, #292524);
}

.slim-hero {
    padding: 86px 0 64px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #a8a29e;
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
}

.category-card a {
    position: relative;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 22px;
    background: #292524;
    border: 1px solid rgba(120, 113, 108, 0.25);
    padding: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.52);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.category-card span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.2));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card strong {
    color: white;
    font-size: 23px;
}

.category-card em {
    color: #d6d3d1;
    font-style: normal;
    font-size: 14px;
    margin-top: 8px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: rgba(41, 37, 36, 0.84);
    border: 1px solid rgba(120, 113, 108, 0.28);
    border-radius: 22px;
}

.global-filter {
    grid-template-columns: minmax(0, 1fr) 180px 180px;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

.detail-hero {
    min-height: 620px;
    display: flex;
    align-items: end;
    padding: 110px 0 70px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    filter: blur(2px) saturate(0.9);
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 10, 9, 0.98), rgba(12, 10, 9, 0.72) 50%, rgba(12, 10, 9, 0.42)), linear-gradient(0deg, #1c1917, transparent 46%);
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(253, 230, 138, 0.28);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.meta-row span {
    color: #e7e5e4;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
}

.player-section {
    background: #0c0a09;
    padding: 38px 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    border: 1px solid rgba(120, 113, 108, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: white;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.24), rgba(0, 0, 0, 0.58));
    z-index: 3;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #d97706;
    font-size: 30px;
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.34);
}

.player-start strong {
    font-size: 18px;
}

.player-start.is-hidden {
    display: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: start;
}

.detail-article,
.detail-side {
    background: rgba(41, 37, 36, 0.9);
    border: 1px solid rgba(120, 113, 108, 0.25);
    border-radius: 24px;
    padding: 28px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 24px;
}

.detail-article p {
    margin: 0 0 24px;
    color: #d6d3d1;
    font-size: 17px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-side dt {
    color: #a8a29e;
}

.detail-side dd {
    margin: 0;
    color: white;
}

.site-footer {
    border-top: 1px solid rgba(120, 113, 108, 0.25);
    background: #0c0a09;
    padding: 52px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 0.7fr 0.7fr;
    gap: 34px;
}

.footer-grid p {
    color: #a8a29e;
    max-width: 620px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 18px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-grid a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(120, 113, 108, 0.18);
    color: #78716c;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .movie-grid,
    .compact-grid,
    .archive-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rank-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-hero-grid {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .nav-search {
        min-width: 220px;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        background: #292524;
        border: 1px solid rgba(120, 113, 108, 0.25);
        border-radius: 18px;
        padding: 12px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-dropdown,
    .nav-search {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .dropdown-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .hero {
        min-height: 620px;
        height: 78vh;
    }

    .hero-overlay {
        background: linear-gradient(0deg, #1c1917 0%, rgba(28, 25, 23, 0.72) 55%, rgba(28, 25, 23, 0.25) 100%);
    }

    .hero-content {
        bottom: 70px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .archive-grid,
    .category-grid,
    .wide-rank,
    .split-rank {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel,
    .global-filter {
        grid-template-columns: 1fr;
    }

    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 240px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .container,
    .nav-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1240px);
    }

    .brand-text strong {
        font-size: 17px;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .archive-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item a {
        grid-template-columns: 40px 68px 1fr;
        gap: 10px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .content-section {
        padding: 52px 0;
    }
}
