* {
    box-sizing: border-box;
}

:root {
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --teal: #0d9488;
    --blue-soft: #e0f2fe;
    --cyan-soft: #ecfeff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbeafe;
    --card: #ffffff;
    --shadow: 0 24px 60px rgba(8, 145, 178, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    color: var(--text);
    background: #ffffff;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(14, 116, 144, 0.12);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 14px 32px rgba(8, 145, 178, 0.35);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.nav-button {
    border: 0;
    background: transparent;
    color: #334155;
    cursor: pointer;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 210px;
    padding: 10px;
    border: 1px solid rgba(8, 145, 178, 0.14);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #475569;
    font-size: 14px;
}

.dropdown-menu a:hover {
    color: var(--cyan-dark);
    background: var(--cyan-soft);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(8, 145, 178, 0.15);
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #0f172a;
    border-radius: 8px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid rgba(8, 145, 178, 0.12);
    border-radius: 18px;
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: #334155;
    font-weight: 650;
}

.mobile-nav a:hover {
    color: var(--cyan-dark);
    background: var(--cyan-soft);
}

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

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    padding: 72px 0 56px;
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.24), transparent 30%),
        radial-gradient(circle at 85% 20%, rgba(45, 212, 191, 0.22), transparent 34%),
        linear-gradient(135deg, #f8fafc 0%, #ecfeff 45%, #eff6ff 100%);
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(14px);
    opacity: 0.55;
}

.hero-glow-one {
    width: 260px;
    height: 260px;
    left: -70px;
    top: 130px;
    background: rgba(34, 211, 238, 0.3);
}

.hero-glow-two {
    width: 320px;
    height: 320px;
    right: -90px;
    bottom: 120px;
    background: rgba(13, 148, 136, 0.22);
}

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

.hero-slide {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 54px;
    min-height: 520px;
}

.hero-slide.active {
    display: flex;
}

.hero-copy {
    flex: 1 1 54%;
}

.eyebrow,
.section-head p,
.sub-hero p {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 8px 14px;
    color: var(--cyan-dark);
    border: 1px solid rgba(8, 145, 178, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.08);
    font-size: 14px;
    font-weight: 750;
}

.hero-copy h1 {
    margin: 0 0 22px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #475569;
    font-size: 19px;
}

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

.hero-tags span,
.tag-list span,
.detail-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    color: var(--cyan-dark);
    border-radius: 999px;
    background: #cffafe;
    font-size: 13px;
    font-weight: 700;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 16px 30px rgba(8, 145, 178, 0.28);
}

.ghost-btn {
    color: var(--cyan-dark);
    border: 1px solid rgba(8, 145, 178, 0.2);
    background: rgba(255, 255, 255, 0.78);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(8, 145, 178, 0.22);
}

.hero-poster {
    position: relative;
    flex: 0 0 min(390px, 38vw);
    border-radius: 34px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 34px 80px rgba(14, 116, 144, 0.26);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    color: #ffffff;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(16px);
    font-size: 14px;
    font-weight: 750;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
}

.hero-dots,
.hero-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.22);
    cursor: pointer;
}

.hero-dot.active {
    width: 56px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(8, 145, 178, 0.16);
    border-radius: 999px;
    background: #ffffff;
    color: var(--cyan-dark);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.quick-search-section,
.category-section,
.rank-section,
.latest-section,
.overview-section,
.library-section,
.rank-page-section,
.player-section,
.story-section,
.related-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.quick-search-section,
.latest-section,
.story-section {
    background: #ffffff;
}

.category-section,
.rank-section {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
}

.category-section {
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.rank-section {
    background: #f8fafc;
}

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

.section-head.center {
    display: block;
    text-align: center;
}

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

.section-head span,
.section-head a,
.sub-hero span {
    color: var(--muted);
}

.section-head a {
    font-weight: 750;
}

.section-head a:hover {
    color: var(--cyan-dark);
}

.library-controls {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(130px, 0.6fr));
    gap: 14px;
    margin: 0 auto 32px;
    padding: 16px;
    border: 1px solid rgba(8, 145, 178, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 40px rgba(8, 145, 178, 0.08);
}

.library-controls label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
}

.library-controls input,
.library-controls select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(8, 145, 178, 0.16);
    border-radius: 15px;
    outline: none;
    color: #0f172a;
    background: #ffffff;
}

.library-controls input:focus,
.library-controls select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.filter-empty {
    margin: 28px 0;
    padding: 20px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(8, 145, 178, 0.25);
    border-radius: 20px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(8, 145, 178, 0.12);
    border-radius: 26px;
    background: var(--card);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 62px rgba(8, 145, 178, 0.18);
}

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

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

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

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta a {
    color: var(--cyan-dark);
    font-weight: 750;
}

.card-body h2,
.card-body h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

.card-body h2 a:hover,
.card-body h3 a:hover,
.rank-copy h2 a:hover {
    color: var(--cyan-dark);
}

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

.movie-card.compact .card-body h2 {
    font-size: 17px;
}

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

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

.category-card,
.category-overview-card {
    overflow: hidden;
    border: 1px solid rgba(8, 145, 178, 0.12);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(8, 145, 178, 0.1);
}

.category-card {
    padding: 14px;
}

.category-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 18px;
}

.category-card span,
.overview-copy h2 {
    display: block;
    margin: 14px 0 6px;
    font-size: 20px;
    font-weight: 850;
}

.category-card p,
.overview-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.overview-link {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
}

.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.overview-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 15px;
}

.overview-copy span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan-dark);
    font-weight: 800;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(8, 145, 178, 0.12);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    font-weight: 900;
}

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

.rank-copy h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-copy p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sub-hero {
    position: relative;
    padding: 86px max(16px, calc((100% - 1180px) / 2));
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.28), transparent 32%),
        linear-gradient(135deg, #f8fafc, #ecfeff 52%, #eff6ff);
}

.sub-hero h1 {
    margin: 0 0 14px;
    max-width: 820px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.sub-hero span {
    display: block;
    max-width: 780px;
    font-size: 18px;
}

.channel-hero,
.rank-hero {
    background:
        radial-gradient(circle at 80% 8%, rgba(45, 212, 191, 0.26), transparent 32%),
        linear-gradient(135deg, #f8fafc, #ecfeff, #ffffff);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 64px max(16px, calc((100% - 1180px) / 2));
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(12px);
    transform: scale(1.08);
}

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

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-copy {
    color: #ffffff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-line {
    max-width: 760px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.detail-tags span {
    background: rgba(207, 250, 254, 0.14);
    color: #cffafe;
}

.player-section {
    padding-bottom: 36px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.25);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(15, 23, 42, 0.36);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 24px 54px rgba(8, 145, 178, 0.42);
    font-size: 34px;
}

.story-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-top: 30px;
}

.story-card {
    padding: 28px;
    border: 1px solid rgba(8, 145, 178, 0.12);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: #475569;
}

.site-footer {
    padding: 58px max(16px, calc((100% - 1180px) / 2)) 28px;
    color: #475569;
    background: #f8fafc;
    border-top: 1px solid rgba(8, 145, 178, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 14px;
    color: var(--cyan-dark);
    font-size: 24px;
}

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

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

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a:hover {
    color: var(--cyan-dark);
}

.footer-bottom {
    margin-top: 38px;
    padding-top: 22px;
    border-top: 1px solid rgba(8, 145, 178, 0.1);
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1080px) {
    .movie-grid,
    .dense-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .home-rank,
    .story-section,
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-section {
        min-height: auto;
        padding-top: 46px;
    }

    .hero-slide {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
        gap: 32px;
    }

    .hero-poster {
        flex-basis: auto;
        max-width: 360px;
        margin: 0 auto;
    }

    .library-controls {
        grid-template-columns: 1fr 1fr;
    }

    .search-field {
        grid-column: 1 / -1;
    }

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

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

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

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

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

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

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

    .hero-copy h1,
    .detail-copy h1,
    .sub-hero h1 {
        letter-spacing: -0.03em;
    }

    .hero-controls,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-controls,
    .movie-grid,
    .home-grid,
    .related-grid,
    .dense-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 46px 76px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 13px;
    }

    .rank-cover img {
        width: 76px;
    }

    .rank-copy h2 {
        font-size: 16px;
    }

    .rank-copy p {
        display: none;
    }

    .quick-search-section,
    .category-section,
    .rank-section,
    .latest-section,
    .overview-section,
    .library-section,
    .rank-page-section,
    .player-section,
    .story-section,
    .related-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }
}
