:root {
    --bg: #f6fbfa;
    --paper: #ffffff;
    --ink: #111827;
    --muted: #5b6878;
    --soft: #e7f5f3;
    --line: #dbe7e5;
    --brand: #0f766e;
    --brand-strong: #0d9488;
    --brand-light: #14b8a6;
    --dark: #07111f;
    --shadow: 0 18px 50px rgba(8, 29, 43, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 34rem), var(--bg);
    line-height: 1.6;
}

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

img {
    max-width: 100%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(15, 118, 110, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
}

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

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

.desktop-nav a,
.nav-dropdown > a {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover > a,
.nav-dropdown > a.active {
    color: var(--brand);
}

.nav-dropdown {
    position: relative;
    padding: 22px 0;
}

.dropdown-panel {
    position: absolute;
    top: 62px;
    left: -20px;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 4px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.dropdown-panel a:hover {
    background: var(--soft);
}

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

.header-search input,
.search-page-form input,
.mobile-panel input {
    width: 100%;
    padding: 12px 14px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    transition: 0.2s ease;
}

.header-search input:focus,
.search-page-form input:focus,
.mobile-panel input:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.header-search button,
.search-page-form button,
.mobile-panel button {
    padding: 11px 16px;
    color: #ffffff;
    background: var(--brand);
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: var(--soft);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--brand);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 18px 24px 24px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.mobile-panel a {
    padding: 10px 0;
    font-weight: 800;
    color: #374151;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 42px;
    padding: 90px max(28px, calc((100vw - 1280px) / 2 + 24px));
    background-position: center;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-light);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

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

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #c7fffa;
    background: rgba(20, 184, 166, 0.16);
    border: 1px solid rgba(94, 234, 212, 0.24);
}

.tag-row span {
    color: #47706b;
    background: #e8f7f5;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    box-shadow: 0 14px 28px rgba(20, 184, 166, 0.26);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(20, 184, 166, 0.34);
}

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

.ghost-btn.light {
    color: var(--brand);
    background: #ffffff;
    border-color: #ffffff;
}

.hero-poster {
    justify-self: end;
}

.poster-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 2 / 3;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, #0f766e, #111827 62%, #14b8a6);
    border-radius: 20px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
}

.poster-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.poster-title {
    position: relative;
    z-index: 1;
    max-width: 84%;
    padding: 16px;
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.38);
}

.poster-hero {
    width: 300px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 36px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
    z-index: 3;
}

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

.hero-dot.is-active {
    background: var(--brand-light);
}

.home-search-panel,
.content-section,
.page-hero,
.detail-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.home-search-panel {
    margin-top: -56px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    padding-top: 28px;
    padding-bottom: 28px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-search-panel h2,
.section-heading h2,
.page-hero h1,
.info-panel h2,
.side-recommend h2,
.text-block h2,
.player-head h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.home-search-panel p {
    margin: 6px 0 0;
    color: var(--muted);
}

.home-search-panel form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.home-search-panel input {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
}

.home-search-panel button {
    padding: 0 20px;
    color: #ffffff;
    border: 0;
    border-radius: 16px;
    background: var(--brand);
    font-weight: 900;
    cursor: pointer;
}

.content-section {
    padding-top: 64px;
    padding-bottom: 24px;
}

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

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-heading > a,
.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

.category-card,
.category-overview-card,
.movie-card,
.info-panel,
.side-recommend,
.text-block,
.player-section,
.rank-panel,
.ranking-item {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.category-card {
    padding: 22px;
    transition: 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
}

.category-card-head strong {
    color: var(--brand);
    font-size: 14px;
}

.category-card p,
.category-overview-card p,
.movie-desc,
.ranking-item p {
    color: var(--muted);
}

.category-preview {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.category-preview a {
    overflow: hidden;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 28px;
}

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

.movie-card {
    overflow: hidden;
    transition: 0.25s ease;
}

.movie-cover {
    position: relative;
    display: block;
}

.cover-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    padding: 4px 8px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover,
.ranking-title:hover,
.compact-card:hover strong {
    color: var(--brand);
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 8px 0 10px;
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    transition: 0.2s ease;
}

.rank-row:hover {
    background: var(--soft);
}

.rank-number {
    grid-row: span 2;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--brand);
    border-radius: 12px;
    font-weight: 900;
}

.rank-name {
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    margin-top: 34px;
    padding-top: 74px;
    padding-bottom: 78px;
    color: #ffffff;
    background: linear-gradient(135deg, #07111f, #0f766e 58%, #14b8a6);
    border-radius: 0 0 34px 34px;
}

.category-page-hero,
.ranking-hero,
.search-hero {
    background: radial-gradient(circle at 12% 12%, rgba(94, 234, 212, 0.34), transparent 28rem), linear-gradient(135deg, #07111f, #0f766e);
}

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

.category-overview-card {
    display: grid;
    gap: 20px;
    padding: 24px;
    transition: 0.25s ease;
}

.category-overview-card h2 {
    margin: 6px 0 8px;
    font-size: 28px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.poster-small {
    width: 58px;
    border-radius: 12px;
}

.poster-small .poster-title {
    font-size: 10px;
    padding: 6px;
}

.compact-card strong,
.compact-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card strong {
    font-size: 14px;
    line-height: 1.3;
}

.compact-card em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
}

.poster-rank {
    width: 94px;
    border-radius: 16px;
}

.poster-rank .poster-title {
    font-size: 14px;
}

.ranking-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
}

.ranking-title span {
    color: var(--brand);
    font-size: 14px;
}

.detail-hero {
    min-height: 660px;
    color: #ffffff;
    background-position: center;
    background-size: cover;
}

.detail-hero-inner {
    min-height: 660px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 72px;
}

.poster-detail {
    width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.breadcrumb a:hover {
    color: var(--brand-light);
}

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

.detail-main,
.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.player-section,
.text-block,
.info-panel,
.side-recommend {
    padding: 22px;
}

.player-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.player-head > span {
    color: var(--brand);
    font-weight: 900;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.24), rgba(0, 0, 0, 0.36));
    cursor: pointer;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 26px solid var(--brand);
}

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

.info-panel dl {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
}

.info-panel div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.info-panel dd {
    margin: 0;
    font-weight: 900;
}

.info-panel a {
    color: var(--brand);
}

.side-recommend {
    display: grid;
    gap: 14px;
}

.search-page-form {
    max-width: 760px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 26px;
}

.search-page-form input {
    min-height: 54px;
}

.search-page-form button {
    padding: 0 24px;
}

.site-footer {
    margin-top: 74px;
    color: #cbd5e1;
    background: #07111f;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 22px;
}

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

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

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

.site-footer a:hover {
    color: var(--brand-light);
}

@media (max-width: 1180px) {
    .movies-grid,
    .category-movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .header-search {
        width: 260px;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 720px;
        padding-top: 70px;
        text-align: left;
    }

    .hero-poster {
        justify-self: start;
    }

    .poster-hero {
        width: 200px;
    }

    .home-search-panel,
    .split-section,
    .detail-layout,
    .detail-hero-inner,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        gap: 24px;
    }

    .detail-poster {
        display: none;
    }

    .rank-panel {
        position: static;
    }

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

@media (max-width: 680px) {
    .header-inner,
    .home-search-panel,
    .content-section,
    .page-hero,
    .detail-hero-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero {
        min-height: 720px;
    }

    .hero-slide {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .home-search-panel form,
    .search-page-form {
        grid-template-columns: 1fr;
    }

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

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

    .movie-title {
        font-size: 14px;
        min-height: 42px;
    }

    .movie-desc,
    .movie-meta,
    .tag-row {
        display: none;
    }

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

    .ranking-item {
        grid-template-columns: 70px minmax(0, 1fr);
        padding: 12px;
    }

    .poster-rank {
        width: 70px;
    }

    .ranking-title {
        font-size: 16px;
    }

    .player-section,
    .text-block,
    .info-panel,
    .side-recommend {
        padding: 16px;
    }
}
