* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #111827;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #ecfeff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 6px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

.brand-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 12px 24px rgba(6, 182, 212, 0.22);
}

.brand-icon.small {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(90deg, #2563eb, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 16px;
    color: #475569;
    border-radius: 12px;
    transition: all 0.22s ease;
    font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.mobile-menu-button {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #0f172a;
    border-radius: 999px;
}

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

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

.hero {
    position: relative;
    min-height: 520px;
    height: 70vh;
    overflow: hidden;
    color: #ffffff;
}

.hero-bg,
.hero-bg img,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.66) 48%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-inner {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 44px;
}

.hero-copy {
    max-width: 720px;
    animation: fadeIn 0.65s ease both;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #22d3ee;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 650px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-meta {
    margin: 26px 0;
    color: #cbd5e1;
}

.hero-meta span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.22);
}

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

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 40px rgba(37, 99, 235, 0.28);
}

.hero-panel {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.42);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

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

.hero-mini-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.22s ease, transform 0.22s ease;
}

.hero-mini-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.hero-mini-card img {
    width: 88px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-mini-card strong,
.hero-mini-card span {
    display: block;
}

.hero-mini-card strong {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.35;
}

.hero-mini-card span {
    margin-top: 7px;
    color: #bae6fd;
    font-size: 12px;
}

.section,
.page-section {
    padding: 56px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.section-head h2,
.page-title h1,
.page-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-title p,
.page-hero p {
    color: #64748b;
    line-height: 1.8;
}

.more-link {
    display: inline-flex;
    color: #2563eb;
    font-weight: 800;
}

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

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

.movie-card,
.list-card,
.category-card,
.rank-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.list-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

.card-cover,
.poster-cover,
.list-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.card-cover {
    aspect-ratio: 16 / 9;
}

.card-cover img,
.poster-cover img,
.list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover img,
.poster-card:hover img,
.list-card:hover img,
.rank-card:hover img {
    transform: scale(1.08);
}

.play-mark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 42px;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
}

.duration,
.corner-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.duration {
    right: 12px;
}

.corner-badge {
    left: 12px;
    background: rgba(37, 99, 235, 0.82);
}

.card-body,
.list-body {
    display: block;
    padding: 16px;
}

.card-body strong,
.list-title {
    display: block;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
}

.card-desc,
.list-desc {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 8px;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.meta-row {
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.card-meta span:first-child,
.meta-row span:first-child {
    color: #f59e0b;
    font-weight: 800;
}

.band {
    padding: 52px 0;
    background: linear-gradient(90deg, rgba(219, 234, 254, 0.78), rgba(207, 250, 254, 0.82));
}

.scroll-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: thin;
}

.scroll-row .movie-card {
    flex: 0 0 280px;
}

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

.poster-card {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-card:hover {
    transform: scale(1.04);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.18);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.1) 58%, rgba(2, 6, 23, 0));
}

.poster-info {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    color: #ffffff;
}

.poster-info strong,
.poster-info span {
    display: block;
}

.poster-info strong {
    font-size: 15px;
    line-height: 1.35;
}

.poster-info span {
    margin-top: 6px;
    color: #fde68a;
    font-size: 12px;
    font-weight: 800;
}

.masonry {
    columns: 3 260px;
    column-gap: 20px;
}

.masonry .movie-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 20px;
}

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

.category-card {
    display: block;
    min-height: 188px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.category-card strong {
    display: block;
    margin: 14px 0 10px;
    color: #0f172a;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.category-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    font-weight: 900;
}

.page-hero {
    padding: 58px 0 36px;
}

.compact-hero {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 32%), radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 34%);
}

.page-title {
    padding: 46px 0 20px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 18px;
    align-items: end;
    padding: 22px;
    margin: 12px 0 28px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.search-box {
    position: relative;
}

.search-box span {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-weight: 900;
}

.search-box input,
.filter-selects select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input {
    padding: 0 16px 0 42px;
}

.filter-selects select {
    padding: 0 34px 0 12px;
}

.search-box input:focus,
.filter-selects select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.filter-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-selects label {
    min-width: 138px;
    display: grid;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 64px 20px;
    color: #64748b;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.list-grid {
    display: grid;
    gap: 16px;
}

.list-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.list-cover {
    min-height: 160px;
}

.list-body {
    align-self: center;
}

.detail-hero {
    padding: 28px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    font-weight: 750;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
    gap: 26px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
}

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

.player-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 38px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 18px 34px rgba(6, 182, 212, 0.34);
    transition: transform 0.2s ease;
}

.player-overlay:hover .player-button {
    transform: scale(1.08);
}

.detail-info {
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.detail-info h1 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.detail-summary,
.article-card {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.detail-summary h2,
.article-card h2 {
    margin: 0 0 12px;
    color: #0f172a;
}

.detail-summary p,
.article-card p {
    color: #475569;
    line-height: 1.92;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 24px;
    margin-top: 28px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tag-cloud span {
    padding: 7px 11px;
    color: #0e7490;
    border-radius: 999px;
    background: #cffafe;
    font-size: 13px;
    font-weight: 800;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 58px 120px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
}

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

.rank-card strong,
.rank-card span {
    display: block;
}

.rank-card strong {
    color: #0f172a;
    line-height: 1.35;
}

.rank-card span {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

.site-footer {
    margin-top: 60px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #111827, #1e293b);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 30px;
    padding: 46px 0 28px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #67e8f9;
}

.site-footer p {
    margin: 14px 0 0;
    line-height: 1.75;
}

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

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

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

.footer-bottom {
    padding: 20px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 14px;
    text-align: center;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    width: 48px;
    height: 48px;
    display: none;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
    cursor: pointer;
}

.back-top.is-visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .mobile-menu-button {
        display: flex;
    }

    .hero {
        height: auto;
        min-height: 0;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 80px 0 44px;
    }

    .hero-panel {
        max-width: 540px;
    }

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

    .filter-panel,
    .player-layout,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-meta span {
        font-size: 13px;
    }

    .hero-panel {
        display: none;
    }

    .section,
    .page-section,
    .band {
        padding: 38px 0;
    }

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

    .movie-grid,
    .movie-grid.four,
    .category-grid,
    .poster-grid {
        grid-template-columns: 1fr;
    }

    .scroll-row .movie-card {
        flex-basis: 238px;
    }

    .filter-selects {
        width: 100%;
    }

    .filter-selects label {
        flex: 1 1 100%;
    }

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

    .rank-card img,
    .list-cover {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
