:root {
    --site-bg: #f8fafc;
    --text-main: #111827;
    --text-muted: #64748b;
    --line: #e5e7eb;
    --emerald: #059669;
    --emerald-dark: #047857;
    --emerald-soft: #d1fae5;
    --blue-soft: #eff6ff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background: var(--site-bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    backdrop-filter: blur(18px);
}

.site-nav {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #2563eb);
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    text-decoration: none;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--emerald);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #334155;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-link {
    padding: 11px 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.hero-shell {
    background: #020617;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.64) 48%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.76) 0%, rgba(2, 6, 23, 0.05) 42%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100vw - 1180px) / 2 + 20px));
    width: min(620px, calc(100vw - 48px));
    transform: translateY(-50%);
    color: #fff;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: #065f46;
    background: rgba(209, 250, 229, 0.92);
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 22px 0 16px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #10b981, #2563eb);
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.26);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover,
.rank-row:hover {
    transform: translateY(-3px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

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

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

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 30px;
    background: #fff;
}

.page-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 44px 20px 72px;
}

.home-main {
    display: grid;
    gap: 78px;
}

.content-section {
    display: grid;
    gap: 26px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-line {
    height: 4px;
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981, rgba(16, 185, 129, 0));
}

.section-more {
    color: var(--emerald);
    background: #ecfdf5;
}

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

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

.category-movie-grid {
    margin-top: 26px;
}

.movie-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-box {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

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

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

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(5, 150, 105, 0.88);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.movie-info {
    display: grid;
    gap: 7px;
}

.movie-info strong {
    font-size: 17px;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-line {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.highlight-panel {
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.08);
}

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

.category-card,
.category-overview-card {
    color: inherit;
    text-decoration: none;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
    display: grid;
    gap: 8px;
    padding: 22px;
}

.category-card strong {
    font-size: 19px;
}

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

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

.movie-card-wide {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.movie-card-wide .poster-box {
    width: 112px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
}

.page-hero {
    padding: 42px;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.55), transparent 42%),
        linear-gradient(135deg, #064e3b, #0f172a);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 780px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
    font-size: 17px;
}

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

.detail-card .breadcrumb {
    color: #64748b;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
    margin-top: 26px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.filter-search,
.filter-select {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.filter-search input,
.filter-select select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    background: #f8fafc;
}

.filter-search input:focus,
.filter-select select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.category-overview-grid {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    padding: 18px;
}

.category-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
}

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

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

.category-overview-card h2 a,
.category-samples a {
    color: inherit;
    text-decoration: none;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.category-samples a {
    padding: 7px 11px;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-size: 13px;
    font-weight: 700;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.rank-row {
    display: grid;
    grid-template-columns: 56px 76px minmax(0, 1fr) minmax(150px, auto) 80px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
    font-size: 22px;
    font-weight: 900;
    color: var(--emerald);
}

.rank-row img {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-main {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.rank-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-main em {
    color: var(--text-muted);
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: #64748b;
    font-size: 14px;
}

.rank-score {
    justify-self: end;
    color: #0f766e;
    font-weight: 900;
}

.detail-main {
    display: grid;
    gap: 44px;
}

.detail-card {
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.main-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #2563eb);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
    cursor: pointer;
}

.player-message {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    display: none;
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
}

.player-message.show {
    display: block;
}

.detail-content {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
    margin-top: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
}

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

.detail-text h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-weight: 700;
    font-size: 14px;
}

.detail-one-line {
    color: #334155;
    font-size: 17px;
    line-height: 1.8;
}

.detail-sections {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.detail-section {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: #334155;
    line-height: 1.95;
    font-size: 16px;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 28px;
    border-radius: 18px;
    color: #64748b;
    background: #fff;
    text-align: center;
}

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

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 38px;
}

.footer-brand p,
.footer-column li {
    color: #94a3b8;
    line-height: 1.75;
}

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

.footer-column ul {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-column a {
    color: inherit;
    text-decoration: none;
}

.footer-column a:hover {
    color: #34d399;
}

.footer-logo {
    color: #fff;
    margin-bottom: 14px;
}

.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

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

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 64px minmax(0, 1fr);
    }

    .rank-meta,
    .rank-score {
        display: none;
    }

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

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

@media (max-width: 640px) {
    .site-nav {
        height: 62px;
    }

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

    .hero-stage {
        min-height: 520px;
    }

    .hero-content {
        top: 48%;
    }

    .hero-content p {
        font-size: 15px;
    }

    .page-main {
        padding: 28px 14px 54px;
    }

    .home-main {
        gap: 52px;
    }

    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .highlight-panel,
    .page-hero,
    .detail-card {
        padding: 22px;
        border-radius: 22px;
    }

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

    .movie-card-wide {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .movie-card-wide .poster-box {
        width: 96px;
    }

    .play-button {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
