* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #020617;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(20, 184, 166, 0.15), transparent 32rem),
        radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.72);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(14px);
}

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

.header-row {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #14b8a6, #22d3ee);
    color: #001014;
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.28);
}

.logo-text {
    background: linear-gradient(90deg, #2dd4bf, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #5eead4;
}

.header-search {
    position: relative;
    width: min(300px, 26vw);
}

.header-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding: 10px 18px;
}

.header-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(71, 85, 105, 0.8);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(51, 65, 85, 0.72);
    padding: 14px 0 18px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-nav a {
    border-radius: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.42) 42%, rgba(2, 6, 23, 0.76) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 150px 0 86px;
}

.hero-text {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    border: 1px solid rgba(45, 212, 191, 0.34);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: #5eead4;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 76px);
}

.hero-summary {
    max-width: 670px;
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta {
    margin: 22px 0 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid rgba(71, 85, 105, 0.75);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    color: #cbd5e1;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
}

.pill.teal {
    border-color: rgba(20, 184, 166, 0.45);
    background: rgba(20, 184, 166, 0.16);
    color: #5eead4;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #14b8a6, #22d3ee);
    color: #001014;
    box-shadow: 0 18px 40px rgba(20, 184, 166, 0.24);
}

.btn-secondary {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.68);
    color: #e2e8f0;
}

.hero-controls {
    position: absolute;
    z-index: 3;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 72px;
    display: flex;
    gap: 10px;
}

.hero-control {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-control:hover {
    background: rgba(20, 184, 166, 0.24);
    color: #5eead4;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: max(24px, calc((100vw - 1280px) / 2));
    bottom: 42px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    padding: 0;
}

.hero-dot.is-active {
    background: #2dd4bf;
}

.section {
    padding: 58px 0;
}

.section.compact {
    padding-top: 34px;
}

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

.section-kicker {
    color: #2dd4bf;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-hero h1 {
    margin: 6px 0 0;
    color: #ffffff;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-intro,
.page-hero p {
    max-width: 760px;
    color: #94a3b8;
}

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.52);
    box-shadow: 0 22px 44px rgba(20, 184, 166, 0.1);
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
}

.score-badge,
.year-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(8px);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.score-badge {
    left: 12px;
    color: #facc15;
}

.year-badge {
    right: 12px;
    color: #5eead4;
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    margin: 8px 0 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    margin-top: 12px;
}

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

.category-card {
    display: block;
    min-height: 150px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.2), transparent 13rem),
        rgba(15, 23, 42, 0.64);
    padding: 22px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(45, 212, 191, 0.54);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 21px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    padding: 12px;
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(45, 212, 191, 0.5);
}

.rank-no {
    color: #2dd4bf;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-poster {
    width: 86px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

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

.rank-title {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.rank-desc {
    display: -webkit-box;
    max-width: 720px;
    overflow: hidden;
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-hero {
    padding: 82px 0 36px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin: 28px 0;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    padding: 16px;
}

.search-panel input,
.search-panel select {
    min-height: 46px;
    padding: 0 16px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.45fr);
    gap: 28px;
    align-items: start;
    padding: 54px 0;
}

.player-card,
.detail-side,
.detail-content {
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.66);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #14b8a6, #22d3ee);
    color: #001014;
    padding: 15px 24px;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 24px 46px rgba(20, 184, 166, 0.28);
}

.player-info,
.detail-content {
    padding: 24px;
}

.detail-title {
    font-size: clamp(32px, 4vw, 54px);
}

.detail-meta {
    margin-top: 18px;
}

.detail-lead {
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.detail-side {
    padding: 18px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

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

.info-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.56);
    padding-bottom: 10px;
    color: #cbd5e1;
}

.info-list span:first-child {
    color: #64748b;
}

.detail-content {
    margin-top: 28px;
}

.detail-content h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.detail-content p {
    margin: 0 0 16px;
    color: #cbd5e1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #5eead4;
}

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

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.7);
    background: rgba(2, 6, 23, 0.86);
    padding: 34px 0;
    color: #64748b;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #94a3b8;
}

.empty-result {
    display: none;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    color: #94a3b8;
    padding: 22px;
}

@media (max-width: 1120px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        min-height: 590px;
    }

    .hero-content {
        padding: 128px 0 76px;
    }

    .hero-controls {
        right: 18px;
        bottom: 34px;
    }

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

    .search-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

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

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

    .section-title-row,
    .footer-row {
        align-items: start;
        flex-direction: column;
    }

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

    .rank-item .btn {
        grid-column: 2 / 4;
        width: 100%;
    }

    .rank-poster {
        width: 72px;
    }

    .logo {
        font-size: 20px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
