:root {
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-300: #5eead4;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --cyan-500: #06b6d4;
    --blue-600: #2563eb;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 30px 70px rgba(15, 23, 42, 0.24);
    --radius-xl: 22px;
    --radius-2xl: 30px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--slate-50), #ffffff 36%, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "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(100% - 32px, var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--teal-600), var(--cyan-500), var(--blue-600));
    box-shadow: 0 16px 36px rgba(13, 148, 136, 0.28);
}

.header-inner {
    width: min(100% - 32px, var(--container));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    color: #ffffff;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    transform: translateZ(0);
    transition: transform 0.25s ease, background 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.27);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--teal-100);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: 10px 13px;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 650;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input {
    width: 220px;
    border: 0;
    outline: 0;
    color: #ffffff;
    border-radius: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--teal-700);
    background: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 118, 110, 0.96);
}

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

.mobile-search {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 16px 0 10px;
    display: flex;
    gap: 8px;
}

.mobile-search input {
    width: 100%;
}

.mobile-nav {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 0 0 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-carousel {
    position: relative;
    width: 100%;
    min-height: 560px;
    margin-bottom: 72px;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-track {
    position: relative;
    min-height: 560px;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: 560px;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(20, 184, 166, 0.28), transparent 38%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.24)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.1));
}

.hero-copy {
    position: absolute;
    left: max(24px, calc((100% - var(--container)) / 2));
    bottom: 82px;
    width: min(720px, calc(100% - 48px));
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    color: var(--teal-300);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.tag-row span {
    color: var(--teal-700);
    background: var(--teal-50);
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.ghost-btn,
.primary-small,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    min-height: 48px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
    box-shadow: 0 18px 36px rgba(6, 182, 212, 0.28);
}

.primary-btn:hover,
.primary-small:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ghost-btn {
    min-height: 48px;
    padding: 0 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ghost-btn.light {
    color: #ffffff;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 32px;
    line-height: 1;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

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

.page-stack {
    display: flex;
    flex-direction: column;
    gap: 64px;
    padding-bottom: 76px;
}

.content-section {
    position: relative;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--slate-500);
}

.section-more {
    color: var(--teal-700);
    padding: 10px 14px;
    background: var(--teal-50);
}

.soft-panel,
.blue-panel,
.warm-panel,
.category-overview-card {
    border-radius: var(--radius-2xl);
    padding: clamp(24px, 4vw, 44px);
}

.soft-panel {
    background: linear-gradient(135deg, var(--teal-50), #ecfeff);
}

.blue-panel {
    background: linear-gradient(135deg, #eff6ff, #ecfeff, var(--teal-50));
}

.warm-panel {
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

.movie-card {
    min-width: 0;
}

.movie-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.movie-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--slate-100);
}

.movie-card.horizontal .movie-link,
.movie-card.rank .movie-link {
    flex-direction: row;
}

.movie-card.horizontal .movie-cover {
    width: 42%;
    min-width: 180px;
    aspect-ratio: 4 / 3;
}

.movie-card.rank .movie-cover {
    width: 172px;
    min-width: 172px;
    aspect-ratio: 16 / 10;
}

.movie-card.poster .movie-info {
    padding: 14px;
}

.movie-card.poster .movie-info p,
.movie-card.poster .tag-row,
.movie-card.mini .movie-info p,
.movie-card.mini .tag-row {
    display: none;
}

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

.movie-link:hover .movie-cover img {
    transform: scale(1.09);
}

.play-badge,
.rank-num {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.play-badge {
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.86);
    box-shadow: 0 12px 28px rgba(20, 184, 166, 0.36);
}

.rank-num {
    top: 12px;
    left: 12px;
    min-width: 50px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
    box-shadow: 0 12px 26px rgba(6, 182, 212, 0.25);
}

.movie-info {
    padding: 18px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 700;
}

.movie-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-link:hover h3 {
    color: var(--teal-600);
}

.movie-info p {
    margin: 0;
    color: var(--slate-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-tile {
    padding: 20px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.category-stack img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

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

.category-tile p {
    margin: 0;
    color: var(--slate-500);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sub-hero {
    margin-bottom: 54px;
    padding: 72px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(94, 234, 212, 0.38), transparent 28%),
        linear-gradient(135deg, var(--slate-900), var(--teal-700), var(--blue-600));
}

.sub-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
}

.sub-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.small-actions {
    margin-top: 24px;
}

.category-overview-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.category-overview-head {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.category-overview-head p {
    margin: 0;
    color: var(--slate-500);
}

.primary-small {
    color: #ffffff;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
}

.filter-toolbar {
    position: sticky;
    top: 92px;
    z-index: 10;
    margin-bottom: 28px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--slate-700);
    background: #ffffff;
    outline: 0;
}

.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.movie-card.hidden {
    display: none;
}

.detail-page {
    padding: 36px 0 72px;
}

.breadcrumb {
    margin-bottom: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--teal-700);
    font-weight: 700;
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: stretch;
}

.player-panel {
    position: relative;
    overflow: hidden;
    min-height: 480px;
    border-radius: var(--radius-2xl);
    background: var(--slate-900);
    box-shadow: var(--shadow-xl);
}

.movie-video {
    width: 100%;
    height: 100%;
    min-height: 480px;
    display: block;
    background: #000000;
}

.video-cover-button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.video-cover-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-cover-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(20, 184, 166, 0.18), transparent 35%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.35));
}

.video-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
    box-shadow: 0 22px 54px rgba(6, 182, 212, 0.38);
    font-size: 36px;
    transform: translate(-50%, -50%);
}

.watch-info {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 22px;
    border-radius: var(--radius-2xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
}

.watch-copy h1 {
    margin: 8px 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.watch-copy p {
    color: var(--slate-500);
}

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

.detail-meta div {
    padding: 10px;
    border-radius: 14px;
    background: var(--slate-50);
}

.detail-meta dt {
    color: var(--slate-500);
    font-size: 12px;
}

.detail-meta dd {
    margin: 2px 0 0;
    font-weight: 800;
}

.detail-text {
    margin-top: 34px;
    padding: clamp(24px, 4vw, 42px);
    border-radius: var(--radius-2xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.detail-text h2 {
    margin: 0 0 12px;
    font-size: 30px;
}

.detail-text p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
}

.related-section {
    margin-top: 42px;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, var(--slate-900), #134e4a, var(--slate-900));
}

.footer-inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 44px 0;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.footer-mark {
    color: #ffffff;
    background: rgba(20, 184, 166, 0.26);
}

.footer-brand strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    margin-bottom: 8px;
}

.footer-brand p {
    max-width: 760px;
    margin: 0;
    color: #9ca3af;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-bottom: 28px;
}

.footer-links a:hover {
    color: var(--teal-300);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

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

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

@media (max-width: 780px) {
    .header-inner {
        min-height: 66px;
    }

    .brand-title {
        font-size: 20px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide img {
        min-height: 520px;
    }

    .hero-copy {
        bottom: 92px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .section-head,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .featured-grid,
    .four-grid,
    .catalog-grid,
    .horizontal-grid,
    .mini-grid,
    .category-grid,
    .poster-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .movie-card.horizontal .movie-link,
    .movie-card.rank .movie-link {
        flex-direction: column;
    }

    .movie-card.horizontal .movie-cover,
    .movie-card.rank .movie-cover {
        width: 100%;
        min-width: 0;
        aspect-ratio: 3 / 4;
    }

    .filter-toolbar {
        position: static;
        grid-template-columns: 1fr;
    }

    .watch-info {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 220px;
    }

    .player-panel,
    .movie-video {
        min-height: 320px;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .mobile-search,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 24px, var(--container));
    }

    .mobile-nav,
    .featured-grid,
    .four-grid,
    .catalog-grid,
    .horizontal-grid,
    .mini-grid,
    .category-grid,
    .poster-strip {
        grid-template-columns: 1fr;
    }

    .soft-panel,
    .blue-panel,
    .warm-panel,
    .category-overview-card,
    .detail-text {
        border-radius: 22px;
        padding: 22px;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide img {
        min-height: 560px;
    }

    .hero-controls {
        width: calc(100% - 28px);
        justify-content: space-between;
    }
}
