:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --red: #ef4444;
    --pink: #ec4899;
    --yellow: #fde047;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    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: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.brand-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--orange-dark), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.main-nav a,
.mobile-nav a {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
    color: var(--orange-dark);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input {
    width: 190px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: var(--white);
}

.header-search input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button,
.primary-btn,
.secondary-btn,
.card-link {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn,
.card-link {
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.header-search button {
    padding: 10px 16px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
}

.secondary-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.16);
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.card-link:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: var(--ink);
    background: #fff7ed;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mobile-nav.is-open {
    display: grid;
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg {
    opacity: 0.34;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(127, 29, 29, 0.55), rgba(236, 72, 153, 0.26));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: var(--white);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content .section-kicker,
.detail-copy .section-kicker,
.simple-hero .section-kicker,
.category-hero .section-kicker {
    color: var(--yellow);
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2vw, 24px);
}

.hero-tags,
.movie-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span,
.detail-meta span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    padding: 0;
}

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

.section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

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

.section-head h2,
.filter-panel h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.05em;
}

.section-head a {
    color: var(--orange-dark);
    font-weight: 900;
}

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

.category-tile,
.category-card-large a {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    overflow: hidden;
    position: relative;
    color: var(--white);
    border-radius: 24px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:nth-child(2n),
.category-card-large:nth-child(2n) a {
    background: linear-gradient(135deg, #fb923c, #db2777);
}

.category-tile:nth-child(3n),
.category-card-large:nth-child(3n) a {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.category-tile:hover,
.category-card-large a:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(249, 115, 22, 0.28);
}

.category-tile span,
.category-card-large h2 {
    font-size: 24px;
    font-weight: 900;
}

.category-tile p,
.category-card-large p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.88);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 14px 35px rgba(17, 24, 39, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1f2937;
}

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

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

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.58));
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.74);
}

.movie-year {
    left: 14px;
}

.rank-badge {
    right: 14px;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.movie-info {
    padding: 18px;
}

.movie-tags span {
    color: var(--orange-dark);
    background: #fff7ed;
}

.movie-info h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.movie-info h3 a:hover {
    color: var(--orange-dark);
}

.movie-info p {
    min-height: 50px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.card-link {
    display: inline-flex;
    padding: 9px 16px;
    font-size: 14px;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

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

.compact-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, #111827, #1f2937);
    box-shadow: var(--shadow);
}

.compact-panel h3 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 22px;
}

.compact-link {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    padding: 12px 0;
    color: var(--white);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.compact-link span {
    color: var(--yellow);
    font-weight: 900;
}

.compact-link strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-link em {
    grid-column: 2;
    margin-top: -6px;
    color: #cbd5e1;
    font-size: 13px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
}

.page-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
}

.page-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.page-hero h1,
.detail-copy h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding: 22px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 12px 35px rgba(17, 24, 39, 0.08);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.filter-input,
.filter-select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    background: var(--white);
}

.filter-input {
    width: min(360px, 100%);
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.empty-state {
    display: none;
    padding: 48px;
    text-align: center;
    color: var(--muted);
    border-radius: 24px;
    background: var(--white);
}

.empty-state.is-visible {
    display: block;
}

.detail-hero {
    min-height: 620px;
}

.detail-bg {
    opacity: 0.34;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(127, 29, 29, 0.64), rgba(249, 115, 22, 0.18));
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

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

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

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.detail-copy .detail-meta {
    margin-bottom: 18px;
}

.player-section {
    padding-top: 52px;
}

.player-box {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.28);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--orange-dark);
    background: var(--white);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
    font-size: 34px;
    text-indent: 4px;
}

.play-layer strong {
    font-size: 20px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-content article {
    padding: 28px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 14px 35px rgba(17, 24, 39, 0.08);
}

.detail-content p {
    margin: 14px 0 0;
    color: #374151;
}

.site-footer {
    margin-top: 36px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 50px 0;
}

.footer-grid h3,
.footer-brand strong {
    margin: 0 0 14px;
    color: var(--white);
}

.footer-grid p {
    margin: 12px 0 0;
    color: #9ca3af;
}

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

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

.footer-grid a:hover {
    color: var(--yellow);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

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

    .compact-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .brand-text {
        font-size: 20px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content h1,
    .hero-content h2,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.04em;
    }

    .section,
    .detail-inner {
        width: min(100% - 24px, 1180px);
    }

    .section {
        padding: 42px 0;
    }

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

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

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

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

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 26px;
    }
}

@media (max-width: 520px) {
    .header-inner {
        width: min(100% - 20px, 1180px);
    }

    .mobile-nav {
        width: min(100% - 20px, 1180px);
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-actions {
        width: 100%;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }

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

    .movie-cover {
        aspect-ratio: 16 / 9;
    }

    .play-circle {
        width: 68px;
        height: 68px;
    }
}
