:root {
    --text: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --brand: #f97316;
    --brand-dark: #ea580c;
    --red: #ef4444;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    max-width: 1280px;
    height: 70px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
    color: #111827;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--red));
    box-shadow: 0 12px 22px rgba(249, 115, 22, 0.32);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
    color: #374151;
}

.desktop-nav a {
    padding: 8px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--brand-dark);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
}

.header-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    outline: none;
    padding: 0 16px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.13);
}

.header-search button,
.mobile-nav button,
.primary-button,
.ghost-button,
.filter-bar button {
    height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--red));
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-nav button:hover,
.primary-button:hover,
.filter-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.28);
}

.ghost-button {
    color: var(--brand-dark);
    background: #fff;
    border: 1px solid rgba(249, 115, 22, 0.32);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    font-size: 22px;
    cursor: pointer;
}

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

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

.mobile-nav form {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

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

.main-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
}

.home-hero {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.hero-track {
    position: relative;
    min-height: 620px;
}

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

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

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

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.24)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 92px 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.7fr);
    align-items: center;
    gap: 42px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.18);
    border: 1px solid rgba(253, 186, 116, 0.45);
    color: #fed7aa;
    font-weight: 800;
    margin-bottom: 20px;
}

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

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 26px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #9a3412;
    background: #ffedd5;
}

.hero-side {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.hero-side img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 20px;
}

.hero-side strong {
    display: block;
    margin-top: 16px;
    font-size: 22px;
}

.hero-side span {
    color: #fed7aa;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.active {
    background: #fff;
}

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

.section-title h2,
.section-title h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.section-title p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.category-tile {
    min-height: 150px;
    border-radius: 24px;
    padding: 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(17, 24, 39, 0.18);
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -30px;
    bottom: -34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.category-tile strong {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.category-tile span {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.9);
}

.from-orange-500.to-red-500 { background: linear-gradient(135deg, #f97316, #ef4444); }
.from-blue-500.to-cyan-500 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.from-purple-500.to-pink-500 { background: linear-gradient(135deg, #a855f7, #ec4899); }
.from-green-500.to-emerald-500 { background: linear-gradient(135deg, #22c55e, #10b981); }
.from-red-500.to-orange-500 { background: linear-gradient(135deg, #ef4444, #f97316); }
.from-orange-600.to-red-600 { background: linear-gradient(135deg, #ea580c, #dc2626); }
.from-pink-500.to-red-500 { background: linear-gradient(135deg, #ec4899, #ef4444); }
.from-indigo-500.to-purple-500 { background: linear-gradient(135deg, #6366f1, #a855f7); }
.from-slate-600.to-gray-900 { background: linear-gradient(135deg, #475569, #111827); }
.from-amber-500.to-orange-500 { background: linear-gradient(135deg, #f59e0b, #f97316); }

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(17, 24, 39, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.55), rgba(17, 24, 39, 0));
    opacity: 0.8;
}

.card-year {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    background: rgba(17, 24, 39, 0.74);
    font-size: 12px;
    font-weight: 800;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    margin-left: -27px;
    margin-top: -27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--red));
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.card-meta,
.card-footer,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span:first-child {
    color: var(--brand-dark);
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--brand-dark);
}

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

.card-footer {
    justify-content: space-between;
    margin-top: 16px;
}

.card-footer a {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.rank-item a {
    display: grid;
    grid-template-columns: 54px 72px minmax(0, 1fr) 70px;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}

.rank-item a:hover {
    background: #fff7ed;
}

.rank-item:last-child a {
    border-bottom: 0;
}

.rank-no {
    font-size: 22px;
    font-weight: 900;
    color: var(--brand-dark);
}

.rank-item img {
    width: 72px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-year {
    text-align: right;
    color: var(--muted);
    font-weight: 700;
}

.page-hero {
    background: linear-gradient(135deg, #fff7ed, #fff, #fef2f2);
    border-bottom: 1px solid var(--line);
}

.page-hero .main-wrap {
    padding-top: 56px;
    padding-bottom: 40px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px 150px auto;
    gap: 12px;
    padding: 16px;
    margin-bottom: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

.detail-hero {
    background: #111827;
    color: #fff;
}

.detail-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

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

.detail-copy h1 {
    margin: 14px 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.detail-copy p {
    margin: 0 0 20px;
    color: #e5e7eb;
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.player-section {
    background: #0f172a;
    padding: 42px 24px;
}

.player-wrap {
    max-width: 1080px;
    margin: 0 auto;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.28), rgba(0, 0, 0, 0.42));
}

.player-trigger span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    background: linear-gradient(135deg, var(--brand), var(--red));
    box-shadow: 0 18px 44px rgba(239, 68, 68, 0.34);
}

.player-trigger.hidden {
    display: none;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 30px;
}

.article-card,
.side-card {
    border-radius: 24px;
    padding: 28px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.article-card h2,
.side-card h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.article-card p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 16px;
}

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

.related-list a {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-list a:hover {
    transform: translateX(4px);
    background: #fff7ed;
}

.related-list img {
    width: 84px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.related-list strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-list span {
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fed7aa;
    font-weight: 700;
}

.breadcrumbs a:hover {
    color: #fff;
}

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    margin-bottom: 12px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

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

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 24px;
    text-align: center;
    color: #9ca3af;
}

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

    .header-search {
        min-width: 220px;
    }
}

@media (max-width: 860px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero-content,
    .detail-hero-inner,
    .content-grid,
    .rank-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-track,
    .hero-content {
        min-height: 720px;
    }

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

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

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .main-wrap {
        padding: 34px 16px;
    }

    .hero-content {
        padding: 76px 16px 70px;
    }

    .hero-track,
    .hero-content {
        min-height: 760px;
    }

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

    .rank-item a {
        grid-template-columns: 44px 62px minmax(0, 1fr);
    }

    .rank-year {
        display: none;
    }

    .detail-hero-inner {
        padding: 34px 16px;
    }

    .player-section {
        padding: 28px 16px;
    }

    .article-card,
    .side-card {
        padding: 22px;
    }
}
