:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #fff9f0;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #ffb347;
    --accent-strong: #ff9f24;
    --accent-dark: #995400;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
    --header-height: 72px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 46%, #fff9f0 100%);
    color: var(--text);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1240px;
    height: var(--header-height);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.more-link:hover,
.card-body h3 a:hover,
.rank-row h3 a:hover {
    color: var(--accent-strong);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.tool-input,
.tool-select {
    width: 220px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.tool-input:focus,
.tool-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 179, 71, 0.18);
}

.header-search button,
.hero-button,
.action-button,
.player-start,
.more-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.hero-button:hover,
.action-button:hover,
.player-start:hover,
.more-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(249, 115, 22, 0.3);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #111827;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 14px 20px 20px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    color: #374151;
    font-weight: 700;
}

.main-shell,
.detail-shell,
.category-shell,
.search-shell,
.ranking-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 20px 70px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.45) 46%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 70px;
    z-index: 2;
    width: min(1240px, calc(100% - 40px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 179, 71, 0.95);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.28);
}

.hero h1,
.hero h2 {
    max-width: 860px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 760px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 22px);
}

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

.hero-meta span,
.detail-tags span,
.tag-row span,
.category-chip,
.info-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

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

.hero-secondary {
    color: #ffffff;
    font-weight: 800;
    padding: 10px 0;
}

.hero-controls {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-1px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--accent);
}

.content-section {
    margin: 0 0 62px;
}

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

.section-heading h2,
.page-title-row h1,
.category-card h2,
.detail-info h1,
.ranking-title h1,
.search-title h1 {
    margin: 0;
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(25px, 3vw, 36px);
}

.section-heading p,
.page-lead,
.category-card p,
.search-title p,
.ranking-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.more-link {
    color: var(--accent-strong);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 179, 71, 0.65);
    box-shadow: var(--shadow);
}

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

.poster-link img,
.mini-card img,
.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.mini-card:hover img,
.rank-row:hover .rank-poster img {
    transform: scale(1.07);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 159, 36, 0.95);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.56);
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 16px;
}

.card-body h3,
.card-body h2 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.35;
}

.meta-line {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.card-summary {
    min-height: 46px;
    margin: 10px 0 12px;
    color: #4b5563;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row,
.detail-tags,
.category-grid-small {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    background: #fff4df;
    color: var(--accent-dark);
}

.feature-band {
    padding: 42px;
    border-radius: 26px;
    background: linear-gradient(135deg, #fff9f0, #fff7ed);
    box-shadow: inset 0 0 0 1px rgba(255, 179, 71, 0.26);
}

.horizontal-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 220px);
    gap: 18px;
    overflow-x: auto;
    padding: 6px 0 14px;
    scroll-snap-type: x proximity;
}

.mini-card {
    scroll-snap-align: start;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.mini-card a {
    display: block;
}

.mini-card img {
    height: 250px;
    object-fit: cover;
}

.mini-card span {
    display: block;
    padding: 12px 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.category-card {
    padding: 24px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff, #fff9f0);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-card h2 {
    font-size: 24px;
}

.category-card .more-button {
    display: inline-flex;
    margin-top: 18px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 22px 0 30px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.tool-input {
    width: min(460px, 100%);
    border-radius: 14px;
}

.tool-select {
    width: 160px;
    border-radius: 14px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 92px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #ffffff;
    font-weight: 900;
}

.rank-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

.rank-row h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-row p {
    margin: 0 0 8px;
    color: #4b5563;
}

.breadcrumb {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 20px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--accent-strong);
    font-weight: 700;
}

.player-stage {
    background: #050505;
}

.player-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(255, 179, 71, 0.16), rgba(0, 0, 0, 0.7));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-box.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(32px, 5vw, 54px);
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 20px;
}

.info-pill,
.detail-tags span {
    background: #fff4df;
    color: var(--accent-dark);
}

.detail-info h2,
.related-section h2 {
    margin: 28px 0 10px;
    font-size: 24px;
}

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

.related-section {
    margin-top: 56px;
}

.empty-state {
    display: none;
    padding: 30px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

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

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 30px;
}

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

.footer-inner p {
    max-width: 460px;
    margin: 12px 0 0;
    color: #9ca3af;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    justify-content: flex-end;
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 20px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 14px;
}

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

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

    .header-search {
        margin-left: auto;
    }

    .site-header.nav-open .mobile-nav {
        display: block;
    }

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

@media (max-width: 820px) {
    :root {
        --header-height: 64px;
    }

    .header-inner {
        padding: 0 14px;
        gap: 10px;
    }

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

    .header-search {
        display: none;
    }

    .hero {
        height: 68vh;
        min-height: 520px;
    }

    .hero-content {
        bottom: 62px;
    }

    .hero-prev,
    .hero-next {
        display: none;
    }

    .main-shell,
    .detail-shell,
    .category-shell,
    .search-shell,
    .ranking-shell {
        padding: 30px 14px 54px;
    }

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

    .feature-band {
        padding: 24px 14px;
        border-radius: 20px;
    }

    .section-heading,
    .page-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .rank-row {
        grid-template-columns: 48px 70px 1fr;
        gap: 12px;
    }

    .rank-row p {
        display: none;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

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

    .hero-meta span:nth-child(n+4) {
        display: none;
    }

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

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

    .card-summary {
        min-height: auto;
    }

    .tool-input,
    .tool-select {
        width: 100%;
    }
}
