:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #142033;
    --muted: #667085;
    --line: #e6edf7;
    --blue: #1d4ed8;
    --blue-dark: #0f2f82;
    --blue-soft: #dbeafe;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --shadow: 0 18px 48px rgba(15, 47, 130, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 34rem), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(230, 237, 247, 0.9);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--blue);
}

.brand::before,
.footer-brand::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), #fbbf24);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

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

.main-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    color: #334155;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--blue-soft);
    color: var(--blue);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--blue-soft);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--blue);
}

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

.hero {
    position: relative;
    overflow: hidden;
    margin: 24px auto 56px;
    border-radius: 34px;
    color: #fff;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #2563eb, #1d4ed8 48%, #0f172a);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.28), transparent 22rem),
        radial-gradient(circle at 92% 8%, rgba(249, 115, 22, 0.42), transparent 18rem),
        linear-gradient(90deg, rgba(10, 26, 70, 0.92), rgba(10, 26, 70, 0.36));
    z-index: 1;
}

.hero-track {
    position: relative;
    z-index: 2;
}

.hero-slide {
    display: none;
    min-height: 570px;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 36px;
    padding: 62px;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 0.72s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: scale(1.015);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-copy {
    max-width: 720px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin-top: 14px;
    font-size: clamp(32px, 4.2vw, 56px);
}

.hero p {
    margin: 22px 0 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 15px;
    background: var(--orange);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--orange-dark);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.4);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: none;
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-poster {
    position: relative;
}

.hero-poster a {
    display: block;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 70px rgba(2, 8, 23, 0.4);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.hero-poster a:hover {
    transform: rotate(0deg) translateY(-6px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
}

.hero-search {
    margin-top: 32px;
    display: flex;
    max-width: 560px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(16px);
}

.hero-search input,
.search-box input,
.search-box select {
    width: 100%;
    border: 0;
    outline: none;
    border-radius: 13px;
    padding: 13px 16px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.hero-search button {
    margin-left: 8px;
    white-space: nowrap;
}

.hero-controls {
    position: absolute;
    left: 62px;
    bottom: 36px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
}

.hero-dots button.is-active {
    width: 28px;
    background: #fff;
}

.section {
    margin: 56px 0;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
    font-size: 13px;
}

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-title p {
    margin: 10px 0 0;
    max-width: 760px;
    color: var(--muted);
}

.section-link {
    color: var(--blue);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 14px 38px rgba(15, 47, 130, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(29, 78, 216, 0.28);
    box-shadow: 0 22px 52px rgba(15, 47, 130, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.94);
    color: #fff;
    box-shadow: 0 12px 28px rgba(2, 8, 23, 0.28);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 40px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-weight: 900;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #94a3b8;
}

.movie-card h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.32;
}

.movie-card h3 a:hover {
    color: var(--blue);
}

.movie-card p {
    display: -webkit-box;
    min-height: 52px;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 166px;
    border-radius: 24px;
    padding: 22px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    border: 1px solid var(--line);
    box-shadow: 0 14px 38px rgba(15, 47, 130, 0.08);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -36px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.16);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 10px 0 18px;
    color: var(--muted);
}

.category-card span {
    position: relative;
    z-index: 1;
    color: var(--blue);
    font-weight: 900;
}

.rank-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.5fr);
    gap: 24px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 47, 130, 0.06);
}

.rank-item span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
}

.rank-item strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    margin: 34px 0 28px;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff, #eff6ff);
    border: 1px solid var(--line);
    box-shadow: 0 14px 38px rgba(15, 47, 130, 0.08);
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 24px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 47, 130, 0.06);
}

.search-box input {
    background: #f8fafc;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
    gap: 30px;
    margin: 34px 0;
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, #0f2f82, #1d4ed8 55%, #0f172a);
    color: #fff;
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 22px 58px rgba(2, 8, 23, 0.32);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-title .movie-meta-line {
    color: rgba(255, 255, 255, 0.82);
}

.detail-title p {
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-tags .tag-row span {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-section,
.content-panel {
    margin: 34px 0;
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 38px rgba(15, 47, 130, 0.08);
}

.player-section h2,
.content-panel h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    padding: 0;
    color: #fff;
    cursor: pointer;
    background: #020617;
}

.play-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    filter: blur(1px) saturate(1.08);
}

.play-center {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.38);
    font-size: 32px;
}

.play-cover strong {
    display: block;
    font-size: 24px;
}

.play-cover span:last-child {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.76);
}

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

.content-panel p {
    margin: 0 0 16px;
    color: #475569;
    font-size: 17px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #bfdbfe;
}

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

.site-footer {
    margin-top: 64px;
    padding: 44px 0 24px;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

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

.category-links {
    align-content: start;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.56);
    font-size: 14px;
}

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

    .hero-slide,
    .detail-hero,
    .rank-panel,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding: 42px 28px 90px;
    }

    .hero-controls {
        left: 28px;
    }
}

@media (max-width: 720px) {
    .nav-wrap {
        height: 66px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 20px;
        background: #fff;
        box-shadow: var(--shadow);
        border: 1px solid var(--line);
    }

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

    .main-nav a {
        border-radius: 14px;
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        border-radius: 24px;
    }

    .hero-slide {
        min-height: auto;
        padding: 34px 20px 88px;
    }

    .hero-search,
    .search-box,
    .section-head,
    .page-hero {
        display: block;
    }

    .hero-search button,
    .search-box button {
        width: 100%;
        margin: 10px 0 0;
    }

    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 16px;
    }

    .rank-item {
        grid-template-columns: 42px 1fr;
    }

    .rank-item em {
        grid-column: 2;
    }

    .detail-hero,
    .player-section,
    .content-panel,
    .page-hero {
        padding: 20px;
        border-radius: 22px;
    }
}

@media (max-width: 460px) {
    .main {
        width: min(100% - 20px, 1180px);
    }

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

    .hero h1,
    .hero h2 {
        font-size: 34px;
    }
}
