* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1e293b;
    background: #f8fafc;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.site-header-inner {
    max-width: 1200px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.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;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #ea580c);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
    transition: transform 0.3s ease;
}

.brand:hover .brand-icon,
.footer-brand:hover .brand-icon {
    transform: scale(1.08);
}

.brand-name {
    font-size: 20px;
    background: linear-gradient(90deg, #dc2626, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #dc2626;
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    padding: 10px;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #334155;
}

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

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

.mobile-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: #fef2f2;
    color: #dc2626;
}

.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 92px 24px 0;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    background: #020617;
}

.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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: 56px;
    top: 50%;
    width: min(560px, calc(100% - 112px));
    transform: translateY(-50%);
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero-content h1,
.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 32px;
}

.hero-meta span {
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero-button,
.side-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 28px;
    border-radius: 999px;
    color: #ffffff;
    background: #ef4444;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(239, 68, 68, 0.34);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-button:hover,
.side-button:hover {
    transform: translateY(-2px) scale(1.02);
    background: #dc2626;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

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

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

.page-hero {
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.95), rgba(234, 88, 12, 0.9) 34%, #0f172a 100%);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.compact-hero {
    padding: 64px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(120px, 180px));
    gap: 14px;
    margin: 34px 0 14px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.search-box input,
.search-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    color: #1e293b;
    padding: 0 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.search-panel select:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.content-section {
    margin-top: 64px;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.15;
    color: #1e293b;
}

.section-heading p {
    margin: 0;
    color: #64748b;
}

.section-more {
    color: #dc2626;
    font-weight: 800;
}

.horizontal-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
    flex: 0 0 286px;
    scroll-snap-align: start;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

.card-poster {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-card-small .card-poster {
    height: 150px;
}

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

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

.card-shade {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.16), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
    opacity: 1;
}

.card-play {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.92);
    transform: scale(0.7);
    transition: transform 0.25s ease;
}

.movie-card:hover .card-play {
    transform: scale(1);
}

.card-type {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.card-body strong {
    color: #1e293b;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
    color: #dc2626;
}

.card-body span {
    min-height: 42px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body em {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 13px;
    font-style: normal;
}

.card-body i {
    font-style: normal;
}

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

.category-tile,
.overview-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: 22px;
    background: #0f172a;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.76;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-tile:hover img {
    opacity: 0.94;
    transform: scale(1.08);
}

.category-tile span,
.overview-content {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.category-tile strong,
.overview-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-tile em,
.overview-content em {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
    font-style: normal;
}

.overview-card {
    min-height: 260px;
}

.overview-images {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 1fr 1fr;
    height: 100%;
}

.overview-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.overview-images img:first-child {
    grid-row: 1 / 3;
}

.ranking-lead {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.compact-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    align-items: center;
    min-height: 120px;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.compact-card img {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    object-fit: cover;
    background: #e2e8f0;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 18px;
}

.compact-card em {
    color: #64748b;
    font-style: normal;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 62px 70px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.ranking-number {
    color: #ef4444;
    font-size: 22px;
    font-weight: 900;
}

.ranking-row img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    background: #e2e8f0;
}

.ranking-info strong,
.ranking-info em {
    display: block;
}

.ranking-info strong {
    margin-bottom: 6px;
    color: #1e293b;
}

.ranking-info em {
    color: #64748b;
    font-size: 14px;
    font-style: normal;
}

.ranking-action {
    color: #dc2626;
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 32px;
}

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

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    min-width: 150px;
    height: 54px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.92);
    box-shadow: 0 18px 40px rgba(239, 68, 68, 0.36);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.player-start:hover {
    background: #dc2626;
    transform: translate(-50%, -50%) scale(1.04);
}

.player-card.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.detail-article {
    margin-top: 28px;
    padding: 30px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.detail-article h1 {
    margin: 0 0 16px;
    color: #1e293b;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

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

.tag-list span {
    color: #b91c1c;
    background: #fef2f2;
}

.lead-text {
    padding: 18px 20px;
    border-left: 4px solid #ef4444;
    border-radius: 14px;
    color: #475569;
    background: #fff7ed;
    font-size: 17px;
    line-height: 1.8;
}

.detail-article h2 {
    margin: 28px 0 12px;
    color: #1e293b;
    font-size: 22px;
}

.detail-article p {
    color: #475569;
    line-height: 1.9;
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.prev-next a {
    padding: 16px;
    border-radius: 16px;
    color: #334155;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: color 0.2s ease, transform 0.2s ease;
}

.prev-next a:hover {
    color: #dc2626;
    transform: translateY(-2px);
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.side-poster,
.side-info {
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
    background: #e2e8f0;
}

.side-button {
    width: 100%;
    margin-top: 16px;
}

.side-info h2 {
    margin: 0 0 12px;
    color: #1e293b;
}

.side-info p {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
}

.side-info p:last-child {
    border-bottom: 0;
}

.side-info strong {
    color: #1e293b;
}

.related-section {
    margin-bottom: 72px;
}

.empty-message {
    display: none;
    margin: 20px 0 0;
    color: #64748b;
    text-align: center;
}

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

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-main p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.7;
}

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

.footer-column h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

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

.footer-column a {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding: 22px 24px;
    border-top: 1px solid #1e293b;
    color: #64748b;
    text-align: center;
}

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

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

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

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

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

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

    .site-main {
        padding: 86px 16px 0;
    }

    .hero-carousel {
        height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        left: 22px;
        width: calc(100% - 44px);
    }

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

    .hero-arrow {
        display: none;
    }

    .compact-hero {
        padding: 38px 24px;
    }

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

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

    .movie-grid,
    .small-grid,
    .category-grid,
    .overview-grid,
    .ranking-lead,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 44px 60px 1fr;
    }

    .ranking-action {
        display: none;
    }

    .prev-next {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        padding: 38px 16px;
    }
}
