* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    background: #facc15;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(250, 204, 21, 0.35);
    font-size: 14px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff7cc;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 999px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(120deg, #172554 0%, #1d4ed8 54%, #06b6d4 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 25%, rgba(250, 204, 21, 0.26), transparent 28%),
        radial-gradient(circle at 78% 24%, rgba(103, 232, 249, 0.32), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(37, 99, 235, 0.28));
}

.hero-inner {
    position: relative;
    min-height: 520px;
    padding: 64px 0 42px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 44px;
    align-items: center;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 0.55s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.hero-kicker {
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 16px;
    color: #172554;
    background: #facc15;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(250, 204, 21, 0.25);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0;
    color: #dbeafe;
    font-size: 19px;
}

.hero-tags,
.tag-row,
.detail-tags,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

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

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    color: #eff6ff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 14px;
}

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

.primary-button,
.ghost-button,
.text-button,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button,
.play-button {
    color: #172554;
    background: #facc15;
    border: 0;
    cursor: pointer;
    box-shadow: 0 16px 26px rgba(250, 204, 21, 0.25);
}

.primary-button:hover,
.play-button:hover {
    transform: translateY(-2px);
    background: #fde047;
    box-shadow: 0 18px 30px rgba(250, 204, 21, 0.32);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.10);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

.hero-poster {
    position: relative;
    display: block;
    min-height: 410px;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #2563eb 48%, #06b6d4);
    box-shadow: 0 28px 70px rgba(8, 47, 73, 0.38);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 410px;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.hero-poster:hover img {
    transform: scale(1.045);
}

.hero-poster::after,
.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 25%, rgba(15, 23, 42, 0.44) 100%);
    pointer-events: none;
}

.hero-play,
.play-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-play {
    left: 50%;
    top: 50%;
    width: 78px;
    height: 78px;
    transform: translate(-50%, -50%);
    font-size: 28px;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.hero-control,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-control {
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-size: 28px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.36);
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 28px;
    background: #facc15;
}

.section {
    padding: 54px 0;
}

.section.alt {
    background: rgba(239, 246, 255, 0.62);
}

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

.section-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-lead {
    max-width: 680px;
    margin: 8px 0 0;
    color: #64748b;
}

.text-button {
    color: #2563eb;
    background: #dbeafe;
}

.text-button:hover {
    transform: translateY(-2px);
    background: #bfdbfe;
}

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

.category-card {
    min-height: 154px;
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #0f172a, #2563eb 58%, #22d3ee);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.25);
}

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

.category-card p {
    margin: 0;
    color: #dbeafe;
    font-size: 14px;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(37, 99, 235, 0.16);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #2563eb 48%, #06b6d4);
}

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

.poster-frame:hover img {
    transform: scale(1.055);
}

.image-missing {
    opacity: 0;
}

.poster-glow {
    position: absolute;
    inset: auto 16px 14px 16px;
    height: 40px;
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.45), rgba(34, 211, 238, 0.48));
    filter: blur(24px);
    opacity: 0.88;
}

.play-badge {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    font-size: 16px;
}

.rank-pill {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    color: #172554;
    background: #facc15;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.movie-card h2 {
    margin: 10px 0 8px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.28;
}

.movie-card h2 a:hover {
    color: #2563eb;
}

.movie-card p {
    flex: 1;
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
}

.tag-row span {
    padding: 4px 9px;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    font-size: 12px;
}

.compact-card .poster-frame {
    aspect-ratio: 16 / 9;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    color: #172554;
    background: linear-gradient(135deg, #facc15, #fde68a);
    border-radius: 18px;
    font-weight: 900;
}

.rank-info h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.rank-info p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.filter-panel {
    margin: 0 0 24px;
    padding: 18px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-main {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 150px 160px;
    gap: 12px;
}

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

.filter-input:focus,
.filter-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.page-hero {
    padding: 60px 0;
    color: #ffffff;
    background: linear-gradient(100deg, #0f172a, #1d4ed8 58%, #06b6d4);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: #bfdbfe;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(290px, 0.72fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.player-card {
    background: #050816;
}

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

.player-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    color: #cbd5e1;
    background: #0f172a;
}

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

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

.detail-card p {
    margin: 0 0 16px;
    color: #475569;
}

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

.detail-info div {
    padding: 14px;
    background: #f8fafc;
    border-radius: 14px;
}

.detail-info strong {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.detail-info span {
    color: #0f172a;
    font-weight: 800;
}

.detail-tags span {
    color: #2563eb;
    background: #eff6ff;
    border-color: #dbeafe;
}

.side-poster {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f172a, #2563eb 48%, #06b6d4);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

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

.related-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.related-item img {
    width: 86px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f172a, #2563eb, #06b6d4);
}

.related-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.3;
}

.related-item p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

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

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

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

.site-footer p {
    max-width: 460px;
    color: #94a3b8;
}

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

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

.footer-links a {
    color: #94a3b8;
}

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

.footer-bottom {
    padding: 18px 0;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.hidden-by-filter {
    display: none !important;
}

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

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

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

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

    .hero-poster {
        min-height: 340px;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 66px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: linear-gradient(135deg, #1d4ed8, #0891b2);
        border-radius: 18px;
        box-shadow: 0 18px 38px rgba(15, 23, 42, 0.26);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .hero-inner {
        min-height: auto;
        padding: 42px 0 32px;
    }

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

    .hero-poster,
    .hero-poster img {
        min-height: 260px;
    }

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

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

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

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