:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --teal: #0d9488;
    --teal-soft: #ccfbf1;
    --teal-dark: #115e59;
    --slate: #111827;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(20, 184, 166, 0.32);
}

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

.nav-link {
    padding: 9px 13px;
    color: #334155;
    border-radius: 999px;
    font-weight: 650;
    transition: 0.2s ease;
}

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

.top-search {
    display: flex;
    align-items: center;
    width: 310px;
    padding: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
}

.top-search input {
    min-width: 0;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    outline: 0;
    color: #0f172a;
    background: transparent;
}

.top-search button,
.search-panel button {
    border: 0;
    color: #ffffff;
    background: var(--teal);
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 750;
    cursor: pointer;
    transition: 0.2s ease;
}

.top-search button:hover,
.search-panel button:hover,
.btn.primary:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #0f172a;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a, #1e293b);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 15%, rgba(20, 184, 166, 0.4), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.22) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.96), transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: center;
    gap: 60px;
    height: 100%;
}

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

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    color: #14b8a6;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-text {
    max-width: 680px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags .tag {
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.18);
    border: 1px solid rgba(153, 246, 228, 0.32);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn.primary {
    color: #ffffff;
    background: var(--teal);
    box-shadow: 0 18px 30px rgba(20, 184, 166, 0.32);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #1e293b;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(20, 184, 166, 0.72);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 30px;
    background: #14b8a6;
}

.quick-panel {
    margin-top: -34px;
    position: relative;
    z-index: 8;
}

.quick-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-inner a {
    display: grid;
    min-height: 66px;
    place-items: center;
    color: #0f766e;
    background: #f0fdfa;
    border-radius: 18px;
    font-weight: 850;
    transition: 0.2s ease;
}

.quick-inner a:hover {
    color: #ffffff;
    background: var(--teal);
    transform: translateY(-2px);
}

.page-stack {
    display: grid;
    gap: 58px;
    padding: 70px 0;
}

.content-section {
    min-width: 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.text-link {
    color: var(--teal);
    font-weight: 800;
}

.text-link:hover {
    color: var(--teal-dark);
}

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: 0.24s ease;
}

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

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

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 850;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.24);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    min-height: 34px;
    padding: 0 12px;
    background: rgba(13, 148, 136, 0.95);
    border-radius: 999px;
    font-size: 13px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    background: rgba(15, 23, 42, 0.86);
    border-radius: 12px;
}

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

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 6px;
    color: #111827;
    font-size: 18px;
    line-height: 1.25;
}

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

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

.movie-card p {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 14px;
}

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

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: 0.3s ease;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.2));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 22px;
    color: #ffffff;
}

.category-card strong {
    padding-top: 120px;
    font-size: 24px;
    font-style: normal;
    font-weight: 850;
}

.category-card em {
    max-width: 90%;
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 14px;
    font-style: normal;
}

.category-card:hover img {
    opacity: 0.72;
    transform: scale(1.08);
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 84% 10%, rgba(20, 184, 166, 0.35), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.compact-hero {
    padding: 86px 0 76px;
}

.page-hero h1 {
    color: #ffffff;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px auto;
    gap: 12px;
    max-width: 930px;
    margin-top: 30px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    backdrop-filter: blur(14px);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: #0f172a;
    border: 0;
    border-radius: 14px;
    outline: 0;
    background: #ffffff;
}

.detail-hero {
    padding: 54px 0;
    background:
        radial-gradient(circle at 70% 5%, rgba(20, 184, 166, 0.26), transparent 25%),
        linear-gradient(135deg, #0f172a, #111827 54%, #1e293b);
}

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

.player-card,
.detail-side,
.detail-main,
.related-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
    background: #020617;
    border-color: rgba(255, 255, 255, 0.12);
}

.video-player {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 24px;
}

.player-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.54));
    cursor: pointer;
    transition: 0.2s ease;
}

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

.play-circle {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 5px;
    background: rgba(13, 148, 136, 0.94);
    border-radius: 999px;
    box-shadow: 0 24px 50px rgba(13, 148, 136, 0.34);
    font-size: 34px;
}

.player-error {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: none;
    max-width: calc(100% - 36px);
    padding: 10px 14px;
    color: #ffffff;
    background: rgba(127, 29, 29, 0.9);
    border-radius: 12px;
    font-size: 14px;
}

.player-error.show {
    display: block;
}

.detail-side {
    overflow: hidden;
    padding: 16px;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #0f172a;
    border-radius: 18px;
}

.detail-meta-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.detail-meta-box p {
    margin: 0;
    padding: 9px 8px;
    color: #0f766e;
    text-align: center;
    background: #f0fdfa;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
}

.detail-stack {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #0f766e;
    font-weight: 700;
}

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

.detail-main {
    padding: 30px;
}

.detail-one-line {
    margin: 18px 0 0;
    color: #334155;
    font-size: 20px;
    font-weight: 650;
}

.detail-tags {
    margin-top: 22px;
}

.info-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
}

.info-strip span {
    color: #334155;
    font-weight: 700;
}

.text-block {
    margin-top: 32px;
}

.text-block h2,
.related-panel h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.text-block p {
    margin: 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.85;
}

.review-block {
    padding: 22px;
    background: linear-gradient(135deg, #f8fafc, #f0fdfa);
    border-radius: 20px;
}

.related-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
}

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

.related-list .movie-card {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    border-radius: 18px;
}

.related-list .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

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

.related-list .movie-card p,
.related-list .tag-row,
.related-list .play-chip {
    display: none;
}

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    color: #ffffff;
}

.site-footer p {
    max-width: 620px;
    margin: 10px 0 0;
}

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

.footer-links a {
    color: #e2e8f0;
    font-weight: 700;
}

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

@media (max-width: 1060px) {
    .top-search {
        display: none;
    }

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

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

    .detail-side,
    .related-panel {
        position: static;
    }
}

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

    .nav-wrap {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        text-align: center;
    }

    .hero-carousel {
        height: auto;
        min-height: 660px;
    }

    .hero-slide {
        min-height: 660px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 72px 0 92px;
    }

    .hero-poster {
        width: min(260px, 72vw);
        margin: 0 auto;
    }

    .hero-control {
        top: auto;
        bottom: 28px;
        transform: none;
    }

    .quick-inner {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .footer-inner,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .logo {
        font-size: 20px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-main h1 {
        font-size: 36px;
    }

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

    .detail-main {
        padding: 22px;
    }

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