* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, .10);
    --panel: rgba(255, 255, 255, .86);
    --teal: #0d9488;
    --cyan: #0891b2;
    --blue: #2563eb;
    --rose: #f43f5e;
    --shadow: 0 24px 70px rgba(15, 23, 42, .14);
    --soft-shadow: 0 14px 35px rgba(15, 23, 42, .10);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, .18), transparent 32rem),
        linear-gradient(180deg, #f8fafc 0%, #eef7f8 42%, #f8fafc 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #0f766e 0%, #0891b2 52%, #2563eb 100%);
    box-shadow: 0 16px 35px rgba(8, 47, 73, .22);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .04em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: #0f766e;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 12px 28px rgba(15, 23, 42, .2);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 9px 13px;
    border-radius: 12px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

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

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

.menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
    gap: 8px;
    flex-direction: column;
}

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

.hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    padding: clamp(28px, 6vw, 72px);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, .55fr);
    align-items: center;
    gap: clamp(24px, 5vw, 64px);
    background-position: center;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity .55s ease, transform .55s ease;
}

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

.hero-copy {
    color: #fff;
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(20, 184, 166, .26);
    border: 1px solid rgba(255, 255, 255, .20);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.06;
    font-size: clamp(38px, 7vw, 72px);
    font-weight: 950;
    letter-spacing: -.045em;
}

.hero h2 {
    margin: 16px 0 0;
    color: #a7f3d0;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.12;
}

.hero p,
.page-hero p,
.detail-info p {
    max-width: 740px;
    color: rgba(255, 255, 255, .86);
    font-size: 18px;
    line-height: 1.82;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(236, 253, 245, .95);
    font-size: 12px;
    font-weight: 800;
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .32);
}

.ghost-btn {
    color: #fff;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.28);
    backdrop-filter: blur(14px);
}

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

.hero-poster {
    justify-self: end;
    width: min(330px, 100%);
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    transform: rotate(3deg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
    border: 1px solid rgba(255,255,255,.24);
}

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

.hero-control {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    pointer-events: none;
}

.hero-control button {
    pointer-events: auto;
    border: 0;
    color: #fff;
    background: rgba(15, 23, 42, .45);
    border: 1px solid rgba(255,255,255,.22);
    cursor: pointer;
}

.hero-control > button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    transition: width .2s ease, background .2s ease;
}

.hero-dots button.active {
    width: 32px;
    background: #5eead4;
}

.search-panel,
.section-block,
.detail-hero,
.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 22px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255,255,255,.82);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-title h2,
.rank-card h2,
.site-footer h2,
.detail-article h2,
.category-overview-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.16;
}

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

.global-search,
.local-search {
    display: flex;
    gap: 10px;
}

.global-search input,
.local-search input {
    min-width: 0;
    flex: 1;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: #fff;
}

.global-search input:focus,
.local-search input:focus {
    border-color: rgba(8, 145, 178, .72);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, .12);
}

.global-search button {
    height: 50px;
    padding: 0 20px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #0d9488, #2563eb);
    cursor: pointer;
}

.section-block {
    padding: clamp(22px, 4vw, 38px);
    border-radius: 30px;
    background: rgba(255,255,255,.82);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(255,255,255,.65);
}

.feature-block {
    background: linear-gradient(135deg, rgba(240, 253, 250, .92), rgba(236, 254, 255, .92));
}

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

.section-title span {
    display: block;
    margin-bottom: 6px;
    color: var(--teal);
    font-weight: 950;
    letter-spacing: .05em;
}

.section-title a {
    color: var(--cyan);
    font-weight: 900;
}

.left-title {
    align-items: start;
}

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

.category-tile,
.category-overview-card a {
    display: block;
    min-height: 150px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
    border: 1px solid rgba(13, 148, 136, .13);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.category-tile:hover,
.category-overview-card a:hover,
.movie-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
    border-color: rgba(8, 145, 178, .34);
}

.category-tile strong,
.category-overview-card h2 {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.category-tile span,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.72;
}

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

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

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

.movie-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .32s ease;
}

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

.play-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-style: normal;
    background: rgba(8, 145, 178, .92);
    box-shadow: 0 12px 24px rgba(8, 145, 178, .32);
}

.movie-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.movie-body strong {
    font-size: 16px;
    line-height: 1.35;
}

.movie-body small {
    color: var(--muted);
}

.movie-desc {
    color: #475569;
    font-size: 13px;
    line-height: 1.62;
}

.tag-row {
    margin-top: auto;
}

.tag-row span {
    color: #0f766e;
    background: #ecfeff;
    border: 1px solid rgba(8, 145, 178, .12);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 24px;
}

.rank-card {
    align-self: start;
    position: sticky;
    top: 92px;
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(180deg, #0f172a, #164e63);
    color: #fff;
}

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 42px 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    transition: background .2s ease, transform .2s ease;
}

.rank-item a:hover {
    background: rgba(255,255,255,.15);
    transform: translateX(3px);
}

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #0f172a;
    background: #99f6e4;
    font-weight: 950;
}

.rank-item strong {
    display: block;
    line-height: 1.4;
}

.rank-item small {
    color: rgba(255,255,255,.72);
}

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

.wide-rank .rank-item a {
    color: #0f172a;
    background: #fff;
    border: 1px solid var(--line);
}

.wide-rank .rank-item small {
    color: var(--muted);
}

.page-hero {
    min-height: 340px;
    display: flex;
    align-items: center;
    padding: clamp(30px, 6vw, 70px);
    border-radius: 34px;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(15, 23, 42, .88), rgba(14, 116, 144, .72)),
        radial-gradient(circle at right top, rgba(34, 211, 238, .42), transparent 26rem),
        #0f172a;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.small-hero {
    min-height: 270px;
}

.tool-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.sticky-tool {
    position: sticky;
    top: 86px;
    z-index: 12;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .10);
    backdrop-filter: blur(14px);
}

.local-search {
    align-items: center;
}

.local-search span {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-buttons button {
    height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(8, 145, 178, .18);
    border-radius: 999px;
    color: #0f766e;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #fff;
    background: linear-gradient(135deg, #0d9488, #2563eb);
}

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

.category-overview-card a {
    min-height: 100%;
    display: grid;
    gap: 18px;
}

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

.category-covers img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-overview-card span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--cyan);
    font-weight: 900;
}

.detail-hero {
    padding: clamp(20px, 4vw, 34px);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .95), rgba(14, 116, 144, .88));
    color: #fff;
    box-shadow: var(--shadow);
}

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

.breadcrumb a:hover {
    color: #99f6e4;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 26px;
    align-items: center;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(0,0,0,.36);
    aspect-ratio: 16 / 9;
}

.player-card video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    align-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(20,184,166,.22), rgba(2,6,23,.58));
    cursor: pointer;
    transition: opacity .2s ease, visibility .2s ease;
}

.play-overlay span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    box-shadow: 0 18px 42px rgba(20, 184, 166, .34);
    font-size: 32px;
    padding-left: 4px;
}

.play-overlay strong {
    font-size: 18px;
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.detail-info p {
    color: rgba(255,255,255,.84);
}

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

.meta-grid span {
    min-height: 72px;
    display: grid;
    gap: 5px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.12);
}

.meta-grid b {
    color: #99f6e4;
}

.detail-tags span {
    color: #0f172a;
}

.detail-article article {
    max-width: 920px;
}

.detail-article h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.detail-article p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 48px;
    padding: 46px 0;
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.site-footer h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 12px;
}

.site-footer p {
    line-height: 1.8;
}

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

.footer-links a {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.08);
}

.footer-links a:hover {
    background: rgba(45, 212, 191, .20);
}

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

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

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

    .rank-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-track {
        min-height: 690px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-poster {
        justify-self: start;
        width: min(230px, 68vw);
        transform: rotate(0);
    }

    .search-panel,
    .tool-bar,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .global-search,
    .local-search {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

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

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

@media (max-width: 520px) {
    .brand {
        font-size: 18px;
    }

    .hero,
    .search-panel,
    .section-block,
    .detail-hero,
    .page-hero {
        width: min(100% - 20px, 1180px);
        border-radius: 22px;
    }

    .hero-track {
        min-height: 650px;
    }

    .movie-grid,
    .compact-grid {
        gap: 12px;
    }

    .movie-body {
        padding: 11px;
    }

    .movie-desc {
        display: none;
    }

    .category-grid,
    .category-overview-grid,
    .wide-rank {
        grid-template-columns: 1fr;
    }

    .rank-item a {
        grid-template-columns: 38px 50px 1fr;
    }
}
