* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #0f172a;
    background: #f8fafc;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f59e0b;
    color: #ffffff;
    font-size: 15px;
    padding-left: 2px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.36);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.78);
    padding: 8px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.hero,
.category-hero,
.detail-hero,
.sub-hero,
.rank-hero {
    color: #ffffff;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
}

.hero {
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 72px 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fbbf24;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero h1,
.category-hero h1,
.detail-heading h1,
.sub-hero h1,
.rank-hero h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.hero h1 span {
    display: block;
    margin-top: 14px;
    color: #fbbf24;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.hero-desc {
    max-width: 760px;
    margin: 24px 0 0;
    color: #e2e8f0;
    font-size: 20px;
}

.hero-actions,
.center-action {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 26px;
    color: #ffffff;
    background: #f59e0b;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.30);
}

.primary-btn:hover {
    transform: translateY(-2px);
    background: #d97706;
}

.ghost-btn {
    min-height: 46px;
    padding: 0 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-search {
    margin-top: 34px;
    max-width: 560px;
}

.hero-search label,
.search-box,
.select-box {
    display: block;
}

.hero-search span,
.search-box span,
.select-box span {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.hero-search span {
    color: #cbd5e1;
}

.hero-search input,
.search-box input,
.select-box select {
    width: 100%;
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 16px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.94);
    outline: none;
}

.hero-search input:focus,
.search-box input:focus,
.select-box select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.hero-card {
    overflow: hidden;
    display: block;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
    transform: rotate(1deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-8px) rotate(0deg);
}

.hero-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.hero-card-info {
    display: block;
    padding: 22px;
}

.hero-card-info b {
    display: block;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.2;
}

.hero-card-info small {
    display: block;
    margin: 8px 0 12px;
    color: #fcd34d;
}

.hero-card-info em {
    display: block;
    color: #e2e8f0;
    font-style: normal;
}

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

.soft-section {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.dark-section {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b 55%, #78350f);
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p {
    max-width: 560px;
    margin: 0;
    color: #64748b;
}

.dark-section .section-head p {
    color: #cbd5e1;
}

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

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

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

.movie-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.20);
}

.cover-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    height: 220px;
    background: #0f172a;
}

.compact-card .cover-wrap {
    height: 180px;
}

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

.movie-card:hover .cover-wrap img {
    transform: scale(1.08);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.10), transparent);
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: #f59e0b;
    font-size: 13px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(15, 23, 42, 0.82);
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.94);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding-left: 3px;
}

.movie-card:hover .play-float {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    display: block;
    padding: 18px;
}

.movie-info strong {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card .movie-info strong {
    min-height: 46px;
    font-size: 16px;
}

.movie-info em,
.card-desc {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
    font-style: normal;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 10px;
    padding: 24px;
    border-radius: 22px;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.category-tile strong {
    font-size: 24px;
    line-height: 1.2;
}

.category-tile span {
    color: #e2e8f0;
    font-size: 14px;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rank-list .movie-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: stretch;
}

.rank-list .cover-wrap {
    height: 100%;
    min-height: 160px;
}

.sub-hero,
.rank-hero,
.category-hero {
    padding: 86px 0 76px;
}

.sub-hero,
.rank-hero {
    background-image: linear-gradient(135deg, #0f172a, #1e293b 58%, #78350f);
}

.sub-hero h1,
.rank-hero h1,
.category-hero h1 {
    margin-bottom: 18px;
}

.sub-hero p,
.rank-hero p,
.category-hero p {
    max-width: 780px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

.category-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 160px;
    overflow: hidden;
    background: #0f172a;
}

.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
}

.category-body p {
    margin: 0 0 18px;
    color: #64748b;
}

.text-link {
    min-height: 38px;
    padding: 0 16px;
    color: #92400e;
    background: #fffbeb;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.10);
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 24px;
    border-radius: 18px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

.empty-state.visible {
    display: block;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: #cbd5e1;
    font-size: 14px;
}

.crumbs a:hover {
    color: #fbbf24;
}

.detail-hero {
    padding: 72px 0;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    width: 260px;
    height: 380px;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

.detail-heading p {
    max-width: 840px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: 20px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.meta-row span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 14px;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.88);
}

.player-section {
    padding: 36px 0 0;
    background: #0f172a;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
    aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover,
.player-cover img,
.player-cover-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background: #000000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    object-fit: cover;
}

.player-cover-shade {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.62), rgba(120, 53, 15, 0.42));
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    color: #ffffff;
    background: #f59e0b;
    box-shadow: 0 20px 70px rgba(245, 158, 11, 0.36);
    transform: translate(-50%, -50%);
    padding-left: 5px;
    font-size: 34px;
}

.player-cover-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
}

.detail-main,
.detail-side {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 44px rgba(15, 23, 42, 0.10);
}

.detail-main {
    padding: 34px;
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.detail-main h2:not(:first-child) {
    margin-top: 34px;
}

.detail-main p {
    margin: 0 0 16px;
    color: #334155;
    font-size: 17px;
}

.detail-side {
    align-self: start;
    padding: 26px;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.detail-side dd {
    margin: -10px 0 0;
    color: #0f172a;
    font-weight: 700;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 0;
}

.footer-wrap p {
    max-width: 600px;
    margin: 8px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 16px;
}

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

@media (max-width: 1024px) {
    .hero-inner,
    .detail-hero-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .detail-poster {
        max-width: 360px;
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .category-grid,
    .category-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    }

    .nav-links.open {
        display: flex;
    }

    .hero {
        min-height: auto;
    }

    .hero-inner {
        padding: 54px 0;
        gap: 30px;
    }

    .hero-card img {
        height: 220px;
    }

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

    .section-head {
        display: block;
    }

    .section-head p {
        margin-top: 10px;
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .category-grid,
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .rank-list .movie-card {
        grid-template-columns: 124px minmax(0, 1fr);
    }

    .rank-list .cover-wrap {
        min-height: 150px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: 210px;
        height: 310px;
    }

    .detail-main,
    .detail-side {
        padding: 22px;
    }

    .footer-wrap {
        align-items: flex-start;
        flex-direction: column;
    }
}
