:root {
    --bg-soft: #fff7ed;
    --bg-page: #fffaf3;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --orange-500: #f97316;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(180, 83, 9, 0.18);
    --card: #ffffff;
    --shadow-sm: 0 10px 24px rgba(120, 53, 15, 0.08);
    --shadow-lg: 0 24px 50px rgba(120, 53, 15, 0.20);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.25), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(120, 53, 15, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1240px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--amber-800);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.32);
    font-size: 15px;
}

.header-search {
    flex: 1;
    max-width: 470px;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--amber-200);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.header-search input,
.mobile-search input,
.search-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 12px 18px;
    color: var(--text);
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button {
    margin: 4px;
}

.primary-btn:hover,
.secondary-btn:hover,
.header-search button:hover,
.mobile-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(217, 119, 6, 0.32);
}

.secondary-btn {
    color: var(--amber-800);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.desktop-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--amber-800);
    font-weight: 800;
}

.desktop-nav a,
.mobile-panel a {
    position: relative;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--amber-600);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--amber-800);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding-top: 14px;
}

.mobile-search {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--amber-200);
    border-radius: 999px;
    overflow: hidden;
}

main {
    min-height: 64vh;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.is-active img {
    transform: scale(1.1);
}

.hero-cover {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.52) 42%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, transparent 38%);
}

.hero-content {
    position: absolute;
    inset: 0;
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 24px 96px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 9px 14px;
    border: 1px solid rgba(253, 230, 138, 0.38);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.46);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

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

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

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

.hero-dot.is-active {
    width: 32px;
    background: #fbbf24;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

.section {
    padding: 64px 0 0;
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.05em;
}

.section-head p,
.page-title p,
.category-intro,
.detail-summary {
    color: var(--muted);
    line-height: 1.8;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
    padding: 30px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.92), rgba(255, 237, 213, 0.92));
    box-shadow: var(--shadow-sm);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.poster-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-card-large .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.68) 100%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--amber-700);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.year-badge,
.rank-badge,
.type-badge {
    position: absolute;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.year-badge {
    right: 10px;
    top: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

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

.movie-meta-line,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-line span,
.detail-meta span,
.filter-chip {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(254, 243, 199, 0.88);
    color: var(--amber-800);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    color: #111827;
}

.movie-card p {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--amber-700);
    background: rgba(245, 158, 11, 0.12);
    font-size: 12px;
}

.genre-line {
    margin-top: 12px;
    color: #9ca3af;
    font-size: 13px;
}

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

.category-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 8%, rgba(251, 191, 36, 0.32), transparent 9rem),
        linear-gradient(135deg, #ffffff, #fff7ed);
    border: 1px solid rgba(245, 158, 11, 0.15);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    color: var(--amber-900);
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.category-card span {
    margin-top: 18px;
    color: var(--amber-600);
    font-weight: 900;
}

.page-hero {
    padding: 68px 0 34px;
    background:
        radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.28), transparent 18rem),
        linear-gradient(180deg, #fff7ed, rgba(255, 255, 255, 0));
}

.page-title {
    max-width: 820px;
}

.page-title h1 {
    margin-bottom: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--amber-700);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--amber-500);
}

.filters {
    margin: 28px 0 32px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(120px, 1fr));
    gap: 14px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.filters select,
.filters input {
    width: 100%;
    border: 1px solid var(--amber-200);
    border-radius: 16px;
    background: #fffaf3;
    color: var(--text);
    padding: 13px 14px;
    outline: 0;
}

.search-result-line {
    margin: 0 0 22px;
    color: var(--muted);
    font-weight: 800;
}

.hidden-card {
    display: none !important;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 86px 132px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    font-size: 24px;
    font-weight: 900;
}

.rank-item img {
    width: 132px;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    object-fit: cover;
}

.rank-item h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-item p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    padding: 38px 0 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

.player-panel {
    overflow: hidden;
    border-radius: 32px;
    background: #050505;
    box-shadow: var(--shadow-lg);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72)),
        rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 4;
}

.play-mask.is-hidden {
    display: none;
}

.play-button {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-700);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    font-size: 34px;
    cursor: pointer;
}

.detail-card {
    padding: 26px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.detail-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
    margin-bottom: 18px;
}

.detail-title {
    margin: 26px 0 12px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.detail-section {
    margin-top: 30px;
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-section p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

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

.site-footer {
    margin-top: 80px;
    color: #fffbeb;
    background: linear-gradient(180deg, var(--amber-900), #451a03);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 52px 24px 34px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
}

.footer-logo {
    color: #fde68a;
}

.footer-brand p,
.site-footer p,
.site-footer a,
.site-footer li {
    color: #fde68a;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    border-top: 1px solid rgba(253, 230, 138, 0.18);
    color: #fde68a;
    text-align: center;
}

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

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

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

    .detail-card {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 18px;
    }

    .detail-card img {
        margin: 0;
    }
}

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

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .hero {
        min-height: 620px;
        height: 76vh;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        padding-bottom: 86px;
    }

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

    .movie-grid,
    .movie-grid.compact,
    .category-cards,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .rank-item {
        grid-template-columns: 54px 100px 1fr;
    }

    .rank-item .primary-btn {
        grid-column: 2 / 4;
        width: max-content;
    }

    .rank-number {
        width: 46px;
        height: 46px;
        font-size: 18px;
        border-radius: 14px;
    }

    .rank-item img {
        width: 100px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .container,
    .hero-content,
    .footer-inner,
    .footer-bottom {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-logo {
        font-size: 22px;
    }

    .hero h1 {
        font-size: 42px;
    }

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

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

    .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-item img {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .rank-item .primary-btn {
        grid-column: auto;
    }

    .detail-card {
        display: block;
    }

    .detail-card img {
        margin-bottom: 18px;
    }
}
