:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --soft: #e2e8f0;
    --teal: #14b8a6;
    --cyan: #0891b2;
    --deep: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    white-space: nowrap;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #0f766e, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.25);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: auto;
    color: #334155;
    font-weight: 700;
    font-size: 15px;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: #0f766e;
}

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 4px;
    background: #ffffff;
    min-width: 320px;
}

.header-search input,
.mobile-nav input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: var(--text);
}

.header-search input {
    padding: 8px 12px;
}

.header-search button,
.mobile-nav button,
.search-panel button,
.button-primary,
.button-ghost,
.play-overlay button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-nav button,
.search-panel button,
.button-primary,
.play-overlay button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    padding: 9px 18px;
    box-shadow: 0 10px 22px rgba(8, 145, 178, 0.22);
}

.button-ghost {
    color: #ffffff;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.header-search button:hover,
.mobile-nav button:hover,
.search-panel button:hover,
.button-primary:hover,
.button-ghost:hover,
.play-overlay button:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    border: 0;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    padding: 14px 24px 20px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

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

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding-top: 8px;
}

.mobile-nav input {
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: #0f172a;
}

.hero-slide {
    display: none;
    min-height: 620px;
    position: relative;
    isolation: isolate;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.68) 45%, rgba(15, 23, 42, 0.18) 100%), radial-gradient(circle at 22% 22%, rgba(20, 184, 166, 0.42), transparent 32%);
}

.hero-content {
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 90px 24px 80px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

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

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    color: #a7f3d0;
    font-weight: 900;
}

.hero h1 {
    margin: 24px 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    color: #dbeafe;
    font-size: 18px;
}

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

.hero-side {
    align-self: stretch;
    display: flex;
    align-items: end;
}

.hero-panel {
    width: 100%;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.11);
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
}

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.section {
    padding: 56px 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: #0f766e;
    font-weight: 900;
}

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

.section-head p,
.page-title p,
.category-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

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

.movie-card:hover img,
.rank-item:hover img {
    transform: scale(1.06);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.62));
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.movie-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(20, 184, 166, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: all 0.24s ease;
}

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

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

.movie-card h3 {
    margin: 0 0 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 18px;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover {
    color: #0f766e;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.movie-card-desc {
    display: -webkit-box;
    margin: 12px 0;
    color: #475569;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    display: block;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
    border: 1px solid #d9f99d;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-card h3 {
    margin: 0;
    font-size: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

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

.rank-no {
    position: absolute;
    left: 10px;
    top: 10px;
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 10px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.rank-body h3 {
    margin: 4px 0 8px;
    font-size: 20px;
}

.rank-body p {
    display: -webkit-box;
    margin: 0 0 10px;
    color: #475569;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    padding: 64px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(45, 212, 191, 0.38), transparent 30%), linear-gradient(135deg, #0f172a, #164e63 58%, #0f766e);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #ccfbf1;
}

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

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

.player-card,
.detail-card,
.side-card,
.search-panel {
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.48));
    pointer-events: auto;
}

.play-overlay.is-hidden {
    display: none;
}

.play-overlay button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 24px;
    font-size: 18px;
}

.detail-card,
.side-card {
    padding: 24px;
    margin-top: 22px;
}

.detail-info h1 {
    margin-bottom: 12px;
}

.detail-info p {
    color: #475569;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-section + .detail-section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-link {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.side-link:hover {
    background: #f1f5f9;
}

.side-link img {
    width: 92px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
}

.side-link strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-link span {
    color: #64748b;
    font-size: 13px;
}

.search-panel {
    padding: 22px;
    margin: -28px 0 32px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 180px 180px auto;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.search-panel input,
.search-panel select {
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
}

.empty-tip {
    display: none;
    padding: 24px;
    color: #64748b;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

.footer-logo {
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

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

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

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

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

    .menu-button {
        display: inline-flex;
        margin-left: auto;
    }

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

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

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

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

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

    .brand {
        font-size: 18px;
    }

    .container {
        padding: 0 16px;
    }

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

    .hero-content {
        padding: 64px 16px 86px;
    }

    .hero-panel {
        padding: 18px;
    }

    .section {
        padding: 40px 0;
    }

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

    .movie-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 120px 1fr;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: -18px;
    }

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