:root {
    --teal: #14b8a6;
    --teal-dark: #0f766e;
    --cyan: #06b6d4;
    --slate: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --panel: #ffffff;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 24px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f1f5f9 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 12px 25px rgba(20, 184, 166, 0.25);
    font-size: 15px;
}

.brand-text {
    font-size: clamp(20px, 2vw, 26px);
    background: linear-gradient(135deg, var(--teal-dark), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.nav-link {
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--teal-dark);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.search-large input {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 11px 16px;
}

.header-search button,
.mobile-search button,
.search-large button,
.filter-button,
.btn-primary,
.btn-ghost,
.player-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-large button,
.btn-primary,
.player-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 14px 28px rgba(20, 184, 166, 0.22);
}

.header-search button {
    padding: 11px 18px;
    border-radius: 999px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.search-large input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
}

.mobile-panel {
    display: none;
    border-top: 1px solid #e2e8f0;
    padding: 16px;
    background: #ffffff;
}

.mobile-panel.open {
    display: block;
}

.mobile-nav {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-search input {
    width: 100%;
    padding: 12px 16px;
}

.mobile-search button {
    padding: 12px 18px;
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: radial-gradient(circle at 25% 38%, rgba(20, 184, 166, 0.28), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.66) 46%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 58%);
}

.hero-content {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 72px;
}

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

.hero-badge,
.eyebrow,
.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(20, 184, 166, 0.96);
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 18px 0;
    font-size: clamp(40px, 7vw, 80px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 640px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.8;
}

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

.hero-meta {
    margin-bottom: 28px;
    color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-pill,
.card-tags a,
.card-tags span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
}

.btn-primary:hover,
.player-button:hover,
.header-search button:hover,
.search-large button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(20, 184, 166, 0.28);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.56);
    cursor: pointer;
    font-size: 28px;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.78);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

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

.page-main {
    padding: 56px 0 74px;
}

.page-main.spacious {
    display: grid;
    gap: 72px;
}

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

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

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.section-more {
    color: var(--teal-dark);
    font-weight: 900;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.35);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.movie-card.featured .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.04) 52%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    color: #ffffff;
    background: rgba(20, 184, 166, 0.95);
    padding: 7px 10px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    padding: 7px 10px;
}

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

.card-meta {
    color: #64748b;
    gap: 6px;
    margin-bottom: 10px;
}

.card-meta span {
    background: #f1f5f9;
    padding: 4px 8px;
    font-size: 12px;
}

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

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

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

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.card-tags a,
.card-tags span,
.tag-pill {
    color: #0f766e;
    background: #ccfbf1;
    padding: 5px 9px;
}

.feature-band {
    padding: 42px;
    border-radius: 30px;
    background: linear-gradient(135deg, #f1f5f9, #ecfeff);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-card a {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 27px;
    letter-spacing: -0.03em;
}

.category-card p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
}

.category-card span {
    width: max-content;
    margin-bottom: 26px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    padding: 8px 12px;
    font-weight: 900;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.45), transparent 32%), linear-gradient(135deg, #0f172a, #164e63 52%, #0f766e);
    padding: 70px 0;
}

.page-hero .page-shell {
    display: grid;
    gap: 18px;
}

.page-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel,
.search-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-input {
    width: min(420px, 100%);
    padding: 13px 16px;
}

.filter-button {
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    padding: 10px 14px;
}

.filter-button.active,
.filter-button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.search-large {
    display: flex;
    gap: 12px;
}

.search-large input {
    width: 100%;
    padding: 16px 20px;
}

.search-large button {
    border-radius: 999px;
    padding: 0 28px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.5;
}

.detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.05);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.38)), linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 55%);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    padding: 62px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.detail-info p {
    max-width: 820px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta span {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
}

.breadcrumb {
    margin-bottom: 12px;
    color: #bae6fd;
    font-size: 14px;
    font-weight: 800;
}

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

.detail-layout {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    padding: 48px 0 74px;
}

.content-card,
.player-card,
.side-card {
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.content-card,
.side-card {
    padding: 28px;
}

.content-card + .content-card {
    margin-top: 24px;
}

.content-card h2,
.side-card h2,
.player-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.content-card p {
    margin: 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.player-card {
    overflow: hidden;
    margin-bottom: 24px;
}

.player-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
    z-index: 3;
}

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

.player-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    border-radius: 999px;
    padding: 0 28px;
    font-size: 18px;
}

.player-button span:first-child {
    font-size: 24px;
}

.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: #f0fdfa;
}

.related-item img {
    width: 74px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.related-item p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.rank-number {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 16px;
    padding: 10px;
    text-align: center;
    font-weight: 950;
}

.rank-row img {
    width: 96px;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    object-fit: cover;
}

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-row p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}

.rank-row .btn-primary {
    min-height: 42px;
    padding: 0 18px;
}

.search-results {
    min-height: 160px;
}

.empty-state {
    padding: 40px;
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 36px;
    padding: 46px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 560px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 800;
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

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

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

@media (max-width: 820px) {
    .hero-slider {
        height: 72vh;
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .feature-band {
        padding: 24px;
        border-radius: 24px;
    }

    .detail-hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .detail-poster {
        width: min(240px, 72vw);
    }

    .rank-row {
        grid-template-columns: 54px 74px 1fr;
    }

    .rank-row .btn-primary {
        grid-column: 2 / -1;
        width: max-content;
    }

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

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .page-main,
    .page-shell,
    .detail-layout,
    .detail-hero-content,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1240px);
    }

    .hero-content {
        width: min(100% - 22px, 1240px);
        padding-bottom: 64px;
    }

    .hero-copy h1,
    .detail-info h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }

    .section-heading {
        display: grid;
    }

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

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

    .movie-card p {
        font-size: 13px;
    }

    .search-large {
        display: grid;
    }

    .search-large button {
        min-height: 46px;
    }
}
