* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #1f2937;
    background: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.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, #1e40af);
    box-shadow: 0 10px 26px rgba(30, 64, 175, 0.25);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #f97316;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
    font-weight: 800;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 19px;
}

.brand-copy em {
    color: #bfdbfe;
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 600;
}

.main-nav a {
    color: #eff6ff;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: #fb923c;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    color: #ffffff;
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
}

.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #1d4ed8 55%, #1e3a8a);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.34), rgba(30, 64, 175, 0.22));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 720px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #facc15;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -1px;
}

.hero p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
}

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

.hero-cats {
    margin-top: 20px;
}

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

.button-primary {
    color: #ffffff;
    background: #f97316;
    box-shadow: 0 12px 22px rgba(249, 115, 22, 0.3);
}

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

.button-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

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

.hero-cats a {
    color: #dbeafe;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #f97316;
}

.main-area {
    padding: 48px 0 64px;
}

.section-block {
    margin-bottom: 56px;
}

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-heading p {
    margin: 6px 0 0;
    color: #6b7280;
}

.section-more {
    color: #2563eb;
    background: #eff6ff;
}

.section-more:hover {
    color: #ffffff;
    background: #2563eb;
    transform: translateY(-2px);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: background 0.25s ease, opacity 0.25s ease;
}

.poster-shade b {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    font-size: 24px;
}

.movie-card:hover .poster-shade {
    background: rgba(0, 0, 0, 0.32);
    opacity: 1;
}

.category-pill,
.year-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.category-pill {
    left: 10px;
    background: #f97316;
}

.year-pill {
    right: 10px;
    background: rgba(17, 24, 39, 0.78);
}

.rank-badge {
    left: 10px;
    top: auto;
    bottom: 10px;
    background: #2563eb;
}

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

.movie-card-body h2 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 16px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-body h2 a:hover {
    color: #ea580c;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 10px;
    overflow: hidden;
    color: #6b7280;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-meta span,
.tag-row span {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
}

.card-meta span {
    color: #1d4ed8;
    background: #dbeafe;
}

.tag-row {
    margin-top: 8px;
}

.tag-row span {
    color: #475569;
    background: #f1f5f9;
}

.category-panel {
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(90deg, #f0fdf4, #eff6ff);
}

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

.category-card {
    display: block;
    min-height: 150px;
    padding: 22px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
}

.category-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    font-size: 22px;
}

.category-card h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 20px;
}

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

.search-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

.search-panel input:focus,
.search-panel select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cta-band {
    border-radius: 24px;
    padding: 42px 32px;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 18px 36px rgba(234, 88, 12, 0.22);
}

.cta-band h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 4vw, 40px);
}

.cta-band p {
    max-width: 720px;
    margin: 0 auto 22px;
    color: #ffedd5;
}

.page-hero {
    padding: 64px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

.page-hero h1 {
    max-width: 920px;
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
}

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

.breadcrumb {
    margin-bottom: 18px;
    color: #bfdbfe;
    font-size: 14px;
}

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

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.player-shell {
    position: relative;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.66));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-start-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #f97316;
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.35);
    font-size: 34px;
    cursor: pointer;
}

.player-title {
    padding: 20px 22px;
}

.player-title h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 24px;
}

.player-title p {
    margin: 0;
    color: #6b7280;
}

.detail-card {
    padding: 26px;
}

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

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

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

.info-list div {
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}

.info-list span {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.info-list strong {
    color: #111827;
}

.side-card {
    padding: 18px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

.rank-row strong {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: #f97316;
}

.rank-row span {
    color: #111827;
    font-weight: 800;
}

.rank-row em {
    grid-column: 2;
    color: #64748b;
    font-size: 13px;
    font-style: normal;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

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

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

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 18px 16px;
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 18px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

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

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

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 24px 20px;
        background: #1e40af;
    }

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

    .main-nav a {
        width: 100%;
        padding: 12px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 70px;
    }

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

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

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

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

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

    .brand-copy em {
        display: none;
    }

    .hero h1,
    .hero h2 {
        font-size: 34px;
    }

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

    .movie-grid,
    .category-grid {
        gap: 12px;
    }

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

    .movie-card-body h2 {
        font-size: 15px;
    }

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