:root {
    color-scheme: light;
    --teal: #0d9488;
    --cyan: #0891b2;
    --blue: #2563eb;
    --dark: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    color: var(--dark);
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.3);
}

.brand-text {
    font-size: 22px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.desktop-nav a,
.mobile-panel a {
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--teal);
}

.header-search,
.mobile-search,
.search-band form,
.large-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.search-band input,
.large-search input,
.filter-bar input {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    min-width: 220px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-band input:focus,
.large-search input:focus,
.filter-bar input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.header-search button,
.mobile-search button,
.search-band button,
.large-search button,
.filter-buttons button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-band button,
.large-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 14px 25px rgba(8, 145, 178, 0.22);
}

.header-search button:hover,
.mobile-search button:hover,
.search-band button:hover,
.large-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.filter-buttons button:hover {
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 26px;
    color: #334155;
}

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

.mobile-panel nav {
    display: grid;
    gap: 14px;
    padding: 16px 0;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(120deg, #0f766e 0%, #0891b2 45%, #2563eb 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 32%), radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.14), transparent 28%), rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(10px) saturate(1.1);
    transform: scale(1.08);
}

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

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 72px 24px 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 58px;
    align-items: center;
}

.eyebrow,
.section-heading p,
.category-overview-head p,
.page-hero p {
    margin: 0 0 12px;
    color: #0d9488;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 900;
}

.hero .eyebrow {
    color: #ccfbf1;
}

.hero h1 {
    max-width: 780px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.hero-summary {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(13, 148, 136, 0.12);
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    transform: rotate(2deg);
}

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

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

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

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

.search-band {
    max-width: 1180px;
    margin: -42px auto 0;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.search-band h2 {
    margin: 0 0 8px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.search-band p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading h2,
.category-overview-head h2 {
    margin: 0;
    font-size: clamp(28px, 3.5vw, 42px);
    letter-spacing: -0.05em;
    font-weight: 900;
}

.section-heading a,
.category-overview-head a {
    color: var(--teal);
    font-weight: 900;
}

.soft-bg {
    max-width: none;
    background: linear-gradient(135deg, #f1f5f9, #f8fafc);
}

.soft-bg > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(13, 148, 136, 0.3);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.15);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #0891b2);
    aspect-ratio: 16 / 10;
}

.movie-card:not(.movie-card-compact) .movie-cover {
    aspect-ratio: 3 / 4;
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.68));
}

.movie-type,
.rank-badge,
.movie-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.movie-type {
    left: 14px;
    top: 14px;
    padding: 6px 10px;
    background: rgba(13, 148, 136, 0.88);
    font-size: 12px;
}

.rank-badge {
    right: 14px;
    top: 14px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.movie-play {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.movie-info {
    padding: 18px;
}

.movie-meta {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-info h3 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.movie-info h3 a:hover {
    color: var(--teal);
}

.movie-info p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

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

.category-tile {
    min-height: 172px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #0891b2 58%, #2563eb);
    box-shadow: 0 18px 45px rgba(8, 145, 178, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(3n+2) {
    background: linear-gradient(135deg, #155e75, #0d9488 58%, #06b6d4);
}

.category-tile:nth-child(3n+3) {
    background: linear-gradient(135deg, #1e3a8a, #0891b2 58%, #14b8a6);
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 58px rgba(8, 145, 178, 0.28);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    font-size: 14px;
    line-height: 1.7;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.category-tile em {
    font-size: 13px;
    line-height: 1.6;
    font-style: normal;
    color: rgba(255, 255, 255, 0.75);
}

.ranking-wrap {
    max-width: none;
    background: #0f172a;
    color: #ffffff;
}

.ranking-wrap > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.dark-heading p,
.dark-heading a {
    color: #5eead4;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(120deg, #0f766e, #0891b2 48%, #2563eb);
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 64px);
    letter-spacing: -0.06em;
    font-weight: 900;
}

.page-hero h2 {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.8;
    font-weight: 500;
}

.page-hero p {
    color: #ccfbf1;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

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

.filter-bar {
    max-width: 1280px;
    margin: 28px auto 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-bar input {
    flex: 1;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-buttons button {
    color: #0f766e;
    background: #ccfbf1;
}

.filter-buttons button.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.empty-state {
    display: none;
    margin: 32px 0;
    padding: 38px;
    border: 1px dashed var(--line);
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

.empty-state.show {
    display: block;
}

.category-overview-block {
    margin-bottom: 56px;
}

.category-overview-head span {
    display: block;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    min-height: 560px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    filter: blur(10px) saturate(1.2);
    transform: scale(1.08);
}

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

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px 72px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
    background: rgba(255, 255, 255, 0.14);
}

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

.detail-copy h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.detail-one-line {
    max-width: 820px;
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.8;
}

.detail-tags {
    margin-bottom: 28px;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.player-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 24px 28px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.play-mask span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.92);
    box-shadow: 0 18px 40px rgba(13, 148, 136, 0.4);
    font-size: 36px;
}

.play-mask strong {
    font-size: 20px;
}

.video-shell.is-playing .play-mask {
    opacity: 0;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

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

.content-card p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.info-card {
    grid-column: span 2;
}

.info-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.info-card div {
    border-radius: 18px;
    padding: 18px;
    background: var(--soft);
}

.info-card dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.info-card dd {
    margin: 8px 0 0;
    font-weight: 900;
}

.info-card a {
    color: var(--teal);
}

.search-page-panel {
    max-width: 1000px;
    margin: -30px auto 0;
    position: relative;
    z-index: 4;
    padding: 26px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.large-search input {
    flex: 1;
    min-width: 0;
}

.search-title {
    margin-top: 18px;
    color: var(--muted);
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #0f172a;
}

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

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

.site-footer p {
    max-width: 480px;
    color: #94a3b8;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 20px 24px;
    text-align: center;
    color: #94a3b8;
}

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

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

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

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

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

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

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

    .search-band,
    .filter-bar,
    .footer-inner {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 680px) {
    .header-inner {
        padding: 0 16px;
    }

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

    .hero,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        padding: 48px 18px 84px;
        gap: 30px;
    }

    .hero-summary,
    .detail-one-line,
    .page-hero h2 {
        font-size: 16px;
    }

    .search-band,
    .section-wrap,
    .player-section,
    .detail-inner,
    .page-hero > div,
    .filter-bar,
    .search-page-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .search-band {
        margin: -26px 16px 0;
    }

    .search-band form,
    .large-search,
    .mobile-search {
        flex-direction: column;
        align-items: stretch;
    }

    .search-band input,
    .large-search input,
    .mobile-search input,
    .header-search input {
        min-width: 0;
        width: 100%;
    }

    .movie-grid,
    .ranking-grid,
    .category-grid,
    .featured-grid,
    .mini-grid,
    .detail-content,
    .info-card dl {
        grid-template-columns: 1fr;
    }

    .info-card {
        grid-column: span 1;
    }

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