:root {
    --color-primary: #0f766e;
    --color-primary-dark: #115e59;
    --color-primary-light: #14b8a6;
    --color-cyan: #06b6d4;
    --color-bg: #f8fafc;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(15, 118, 110, 0.18);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
    color: var(--color-text);
    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% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #0f766e 0%, #0891b2 100%);
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.25);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #0f766e;
    background: #ffffff;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand-text em {
    margin-top: 4px;
    font-size: 12px;
    font-style: normal;
    color: rgba(255, 255, 255, 0.78);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.desktop-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.nav-search {
    width: 310px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.nav-search input,
.mobile-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

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

.nav-search button,
.mobile-search button {
    border: 0;
    cursor: pointer;
    color: var(--color-primary-dark);
    background: #ffffff;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 800;
}

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

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
}

.hero {
    position: relative;
    overflow: hidden;
    background: #062b35;
}

.hero-carousel {
    position: relative;
    min-height: clamp(520px, 70vw, 720px);
}

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

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: clamp(520px, 70vw, 720px);
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(15, 23, 42, 0.66) 48%, rgba(20, 184, 166, 0.12) 100%), linear-gradient(0deg, rgba(3, 7, 18, 0.9) 0%, rgba(3, 7, 18, 0) 52%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 96px;
    width: min(720px, calc(100% - 48px));
    color: #ffffff;
}

.hero-content h1 {
    margin: 16px 0 14px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags a,
.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--color-primary-dark);
    background: #ccfbf1;
    font-size: 13px;
    font-weight: 800;
}

.tag-row--light span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.load-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-cyan));
    box-shadow: 0 16px 40px rgba(20, 184, 166, 0.35);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.load-link:hover {
    transform: translateY(-2px);
}

.hero-rail {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 72px;
    display: grid;
    grid-template-columns: repeat(5, 92px);
    gap: 12px;
    z-index: 3;
}

.hero-dot {
    border: 0;
    cursor: pointer;
    overflow: hidden;
    height: 58px;
    border-radius: 14px;
    padding: 0;
    outline: 2px solid transparent;
    background: rgba(255, 255, 255, 0.18);
}

.hero-dot.is-active {
    outline-color: #ffffff;
}

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

.main-space {
    padding: 64px 0;
}

.section-block {
    margin-bottom: 66px;
}

.section-card {
    padding: clamp(24px, 5vw, 48px);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--color-muted);
}

.section-more {
    min-height: 40px;
    color: var(--color-primary-dark);
    background: #ccfbf1;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #06b6d4);
}

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

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

.movie-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.58), rgba(3, 7, 18, 0));
    opacity: 0.85;
}

.movie-duration,
.rank-badge,
.movie-play {
    position: absolute;
    z-index: 2;
}

.movie-duration {
    right: 12px;
    bottom: 12px;
    border-radius: 9px;
    padding: 5px 8px;
    color: #ffffff;
    background: rgba(3, 7, 18, 0.75);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

.movie-play {
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--color-primary);
}

.movie-card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0 0 14px;
    color: var(--color-muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
}

.movie-meta a {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--color-primary-dark);
    background: #ccfbf1;
    font-weight: 800;
}

.movie-card--horizontal {
    display: grid;
    grid-template-columns: 240px 1fr;
}

.movie-card--horizontal .movie-card-media {
    height: 100%;
    aspect-ratio: auto;
}

.category-hero,
.page-hero,
.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e 0%, #0891b2 56%, #155e75 100%);
}

.category-hero .container,
.page-hero .container,
.detail-hero .container {
    padding: 58px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.page-title {
    max-width: 840px;
}

.page-title h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-title p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 190px 160px;
    gap: 12px;
    margin: 0 0 28px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    padding: 13px 14px;
    color: var(--color-text);
    background: #f8fafc;
}

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

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 245px;
    padding: 26px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #06b6d4);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(15, 118, 110, 0.28);
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.category-card span {
    margin-top: auto;
    font-weight: 900;
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 64px 168px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.ranking-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-size: 18px;
    font-weight: 900;
}

.ranking-cover {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

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

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-info p {
    margin: 0;
    color: var(--color-muted);
}

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

.player-card,
.detail-side,
.content-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.65), rgba(3, 7, 18, 0.12));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay.is-hidden,
.player-frame.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 60px rgba(3, 7, 18, 0.32);
    font-size: 34px;
    transform: translateX(2px);
}

.player-info {
    padding: 24px;
}

.player-info h1 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
}

.player-info p {
    margin: 0;
    color: var(--color-muted);
}

.detail-side {
    padding: 22px;
}

.poster-box {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f766e, #06b6d4);
}

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

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    color: var(--color-muted);
}

.info-list strong {
    color: #0f172a;
}

.content-card {
    padding: clamp(24px, 4vw, 38px);
}

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

.content-card p {
    margin: 0 0 22px;
    color: #334155;
}

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617 0%, #0f172a 48%, #134e4a 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0 36px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: #94a3b8;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 18px 0 28px;
    color: #94a3b8;
}

.empty-state {
    display: none;
    padding: 60px 20px;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-muted);
    text-align: center;
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-rail {
        left: max(24px, calc((100vw - 1180px) / 2));
        right: auto;
        grid-template-columns: repeat(5, 72px);
        bottom: 26px;
    }
}

@media (max-width: 920px) {
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .ranking-row {
        grid-template-columns: 52px 118px 1fr;
    }

    .ranking-row .load-link {
        grid-column: 2 / -1;
    }

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

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

    .brand-text strong {
        font-size: 18px;
    }

    .hero-content {
        bottom: 118px;
        left: 18px;
        width: calc(100% - 36px);
    }

    .hero-actions {
        gap: 8px;
    }

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

    .hero-rail {
        grid-template-columns: repeat(5, 1fr);
        left: 18px;
        right: 18px;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

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

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

    .ranking-row {
        grid-template-columns: 42px 1fr;
    }

    .ranking-cover {
        grid-column: 1 / -1;
        order: -1;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
