:root {
    --mist-50: #f8fafc;
    --mist-100: #f1f5f9;
    --mist-200: #e2e8f0;
    --mist-300: #cbd5e1;
    --mist-400: #94a3b8;
    --mist-500: #64748b;
    --mist-600: #475569;
    --mist-700: #334155;
    --mist-800: #1e293b;
    --mist-900: #0f172a;
    --lake-50: #f0f9ff;
    --lake-100: #e0f2fe;
    --lake-400: #38bdf8;
    --lake-500: #0ea5e9;
    --lake-600: #0284c7;
    --lake-700: #0369a1;
    --lake-900: #0c4a6e;
    --sepia-50: #faf8f5;
    --sepia-100: #f5f1ea;
    --sepia-600: #9d7d52;
    --white: #ffffff;
    --shadow-soft: 0 10px 40px -12px rgba(15, 23, 42, 0.22);
    --shadow-card: 0 18px 45px -20px rgba(15, 23, 42, 0.28);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--mist-900);
    background: linear-gradient(180deg, var(--sepia-50) 0%, #ffffff 42%, var(--mist-50) 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: white;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 14px 32px -24px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--lake-400), var(--lake-700));
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.38);
}

.logo-title {
    display: block;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--mist-400);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
}

.main-nav a {
    color: var(--mist-200);
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--lake-400);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: rgba(30, 41, 59, 0.96);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 0 0 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-menu a {
    display: block;
    padding: 11px 0;
    color: var(--mist-200);
    font-size: 15px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: linear-gradient(115deg, var(--mist-900), var(--mist-800) 52%, var(--lake-900));
}

.hero::before {
    position: absolute;
    inset: -30% -20% auto auto;
    width: 520px;
    height: 520px;
    content: "";
    border-radius: 999px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35), rgba(56, 189, 248, 0));
    pointer-events: none;
}

.hero::after {
    position: absolute;
    inset: auto auto -32% -16%;
    width: 520px;
    height: 520px;
    content: "";
    border-radius: 999px;
    background: radial-gradient(circle, rgba(157, 125, 82, 0.26), rgba(157, 125, 82, 0));
    pointer-events: none;
}

.hero-stage {
    position: relative;
    min-height: 650px;
    padding: 82px 0 76px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: translateY(14px);
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    opacity: 0.38;
    filter: blur(2px) saturate(1.1);
    transform: scale(1.03);
}

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.68) 50%, rgba(12, 74, 110, 0.5));
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    align-items: center;
    gap: 44px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 13px;
    margin-bottom: 18px;
    color: var(--lake-100);
    background: rgba(2, 132, 199, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(14px);
}

.hero-title {
    max-width: 780px;
    margin: 0;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--mist-200);
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--mist-100);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.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: 45px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--lake-500), var(--lake-700));
    box-shadow: 0 16px 34px -16px rgba(2, 132, 199, 0.72);
}

.btn-secondary {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster-info {
    position: absolute;
    inset: auto 18px 18px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
}

.hero-controls {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
}

.hero-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 54px;
    background: var(--lake-400);
}

.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.search-panel {
    position: relative;
    z-index: 4;
    margin: -34px auto 38px;
}

.search-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(16px);
}

.search-input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--mist-200);
    border-radius: 15px;
    color: var(--mist-900);
    background: white;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--lake-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.section {
    padding: 58px 0;
}

.section.alt {
    background: var(--mist-50);
}

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

.section-title {
    margin: 0;
    font-size: clamp(25px, 4vw, 34px);
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--mist-600);
    line-height: 1.7;
}

.more-link {
    flex: none;
    color: var(--lake-700);
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: white;
    box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.92);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: var(--shadow-card);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.15;
    background: var(--mist-100);
}

.poster-link.wide {
    aspect-ratio: 16 / 10;
}

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

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

.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(12px);
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: var(--lake-700);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

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

.card-title a:hover {
    color: var(--lake-700);
}

.card-text {
    display: -webkit-box;
    min-height: 46px;
    margin: 9px 0 0;
    overflow: hidden;
    color: var(--mist-600);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--lake-700);
    background: var(--lake-100);
    font-size: 12px;
}

.category-card {
    display: block;
    min-height: 170px;
    padding: 22px;
    border-radius: 22px;
    color: white;
    background: linear-gradient(135deg, var(--mist-900), var(--mist-800) 56%, var(--lake-900));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
}

.category-card::after {
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 150px;
    height: 150px;
    content: "";
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.18);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--mist-200);
    line-height: 1.7;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 90px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    background: white;
    border: 1px solid var(--mist-200);
    box-shadow: 0 10px 28px -26px rgba(15, 23, 42, 0.9);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, var(--lake-500), var(--lake-700));
}

.rank-thumb {
    width: 90px;
    height: 62px;
    object-fit: cover;
    border-radius: 13px;
}

.rank-title {
    margin: 0 0 5px;
    font-size: 17px;
}

.rank-meta {
    color: var(--mist-600);
    font-size: 14px;
}

.page-hero {
    color: white;
    padding: 64px 0 74px;
    background: linear-gradient(115deg, var(--mist-900), var(--mist-800), var(--lake-900));
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 54px);
    letter-spacing: -0.045em;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--mist-200);
    font-size: 17px;
    line-height: 1.85;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(145px, 0.42fr));
    gap: 12px;
    padding: 16px;
    margin: -38px auto 32px;
    border-radius: 22px;
    background: white;
    border: 1px solid var(--mist-200);
    box-shadow: var(--shadow-soft);
}

.empty-state {
    display: none;
    padding: 32px;
    color: var(--mist-600);
    text-align: center;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--mist-200);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: var(--mist-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--lake-700);
}

.detail-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 34px;
    align-items: start;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    background: var(--mist-100);
    box-shadow: var(--shadow-soft);
}

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

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.15;
    letter-spacing: -0.045em;
}

.detail-intro {
    margin: 0 0 24px;
    color: var(--mist-600);
    font-size: 17px;
    line-height: 1.9;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.meta-box {
    padding: 14px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--mist-200);
}

.meta-label {
    display: block;
    margin-bottom: 5px;
    color: var(--mist-500);
    font-size: 12px;
}

.meta-value {
    font-weight: 700;
}

.player-section {
    padding-top: 20px;
}

.player-card {
    overflow: hidden;
    border-radius: 26px;
    background: var(--mist-900);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

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

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

.player-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 24px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.28));
    cursor: pointer;
    z-index: 3;
}

.player-mask.is-hidden {
    display: none;
}

.player-play {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    color: var(--lake-700);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 45px -24px rgba(255, 255, 255, 0.8);
}

.player-label {
    font-size: 20px;
    font-weight: 800;
}

.content-card {
    padding: 28px;
    border-radius: 24px;
    background: white;
    border: 1px solid var(--mist-200);
    box-shadow: 0 16px 40px -30px rgba(15, 23, 42, 0.65);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 25px;
}

.content-card p {
    margin: 0;
    color: var(--mist-700);
    line-height: 1.95;
}

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

.footer {
    margin-top: 50px;
    color: var(--mist-400);
    background: var(--mist-900);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 30px;
    padding: 42px 0;
}

.footer h3,
.footer h4 {
    margin: 0 0 12px;
    color: white;
}

.footer p,
.footer li {
    line-height: 1.75;
}

.footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer a:hover {
    color: var(--lake-400);
}

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.55s ease both;
}

.slide-up {
    animation: slideUp 0.55s ease both;
}

@media (max-width: 980px) {
    .main-nav {
        display: none;
    }

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

    .mobile-menu.is-open {
        display: block;
    }

    .hero-stage {
        min-height: auto;
        padding: 58px 0 66px;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        min-height: 420px;
    }

    .hero-poster img {
        height: 420px;
    }

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

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

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

    .detail-cover {
        max-width: 360px;
    }

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

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

    .logo-title {
        font-size: 17px;
    }

    .logo-subtitle {
        display: none;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-summary {
        font-size: 16px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 360px;
        height: 360px;
    }

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

    .section-head {
        display: block;
    }

    .more-link {
        display: inline-block;
        margin-top: 12px;
    }

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

    .card-body {
        padding: 13px;
    }

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

    .rank-thumb {
        width: 70px;
        height: 52px;
    }

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

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

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

    .content-card {
        padding: 22px;
    }

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

@media (max-width: 430px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .btn {
        width: 100%;
    }
}
