:root {
    --bg: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: rgba(17, 24, 39, 0.1);
    --orange: #f97316;
    --red: #ef4444;
    --pink: #ec4899;
    --dark: #111827;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 42%, #fff1f2 100%);
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.25);
}

.nav-shell {
    width: min(1220px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    font-weight: 700;
}

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-links a:hover {
    opacity: 1;
    color: #fef3c7;
}

.search-form,
.mobile-search,
.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input,
.mobile-search input,
.hero-search input {
    width: 250px;
    border: 0;
    outline: none;
    border-radius: 999px;
    padding: 11px 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.search-form input::placeholder,
.mobile-search input::placeholder,
.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.search-form button,
.mobile-search button,
.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #9a3412;
    font-weight: 800;
    background: #fffbeb;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 22px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-links a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    background: #111827;
}

.hero-stage {
    position: relative;
    height: 590px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    background: radial-gradient(circle at 10% 10%, rgba(249, 115, 22, 0.45), transparent 35%), #111827;
}

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

.hero-slide > img,
.rank-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}

.hero-angle {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 160px solid rgba(249, 115, 22, 0.86);
    border-left: 160px solid transparent;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.8;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 7px 14px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-tags,
.card-tags,
.genre-tags,
.tag-cloud,
.pill-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.genre-tags span,
.tag-cloud span,
.pill-links a {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.genre-tags span,
.tag-cloud span,
.pill-links a {
    background: #fff7ed;
    color: #c2410c;
}

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

.primary-btn,
.ghost-btn,
.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.35);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.outline-btn {
    color: #ea580c;
    background: #fff7ed;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover,
.outline-btn:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.44);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

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

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

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

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

.hero-dots button.active {
    width: 34px;
    background: var(--orange);
}

.quick-strip {
    width: min(1220px, calc(100% - 32px));
    margin: -38px auto 0;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.quick-strip a {
    min-height: 104px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: var(--shadow);
}

.quick-strip strong,
.quick-strip span {
    display: block;
}

.quick-strip strong {
    margin-bottom: 8px;
    font-size: 20px;
}

.quick-strip span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.section-block,
.split-section,
.detail-layout,
.breadcrumb,
.filter-bar {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.section-block {
    padding: 62px 0;
}

.soft-bg {
    width: 100%;
    padding-left: max(16px, calc((100% - 1220px) / 2));
    padding-right: max(16px, calc((100% - 1220px) / 2));
    background: linear-gradient(135deg, #fff7ed, #ffffff, #fff1f2);
}

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

.section-head h2,
.page-hero h1,
.rank-hero h1,
.detail-card h1 {
    margin: 10px 0 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head a {
    color: #ea580c;
    font-weight: 900;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.09);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link,
.poster-wrap {
    display: block;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.45), transparent 26%), linear-gradient(135deg, #fb923c, #ef4444 48%, #ec4899);
}

.compact .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 12px;
}

.poster-year {
    right: 12px;
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    height: 48px;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
}

.card-tags {
    margin-top: 12px;
}

.card-tags span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #c2410c;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.25), transparent 26%), linear-gradient(135deg, #fb923c, #ef4444 54%, #ec4899);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.18);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile span {
    font-size: 21px;
    font-weight: 900;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    line-height: 1.6;
    font-style: normal;
}

.split-section {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 26px;
    padding: 54px 0;
}

.rank-panel,
.editor-panel,
.detail-card,
.side-card,
.player-card {
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-panel,
.editor-panel,
.detail-card,
.side-card {
    padding: 26px;
}

.compact-head {
    margin-bottom: 18px;
}

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

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

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

.rank-index {
    color: #ef4444;
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #fb923c, #ef4444);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-copy em {
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
}

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

.page-hero,
.rank-hero {
    position: relative;
    width: min(1220px, calc(100% - 32px));
    margin: 38px auto 0;
    overflow: hidden;
    border-radius: 34px;
    padding: 56px;
    color: #ffffff;
    background: radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.22), transparent 24%), linear-gradient(120deg, #f97316, #ef4444, #ec4899);
    box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p,
.rank-hero h1,
.rank-hero p {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

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

.library-hero {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    align-items: end;
    gap: 24px;
}

.hero-search input {
    width: 100%;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.filter-bar button,
.filter-bar a {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #c2410c;
    background: #ffedd5;
    font-weight: 900;
    cursor: pointer;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 26px 0 18px;
    color: #6b7280;
    font-weight: 700;
}

.breadcrumb a {
    color: #ea580c;
}

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

.detail-main {
    min-width: 0;
}

.player-card {
    overflow: hidden;
    margin-bottom: 26px;
    padding: 0;
    background: #000000;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at 50% 20%, rgba(249, 115, 22, 0.25), transparent 32%), #020617;
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

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

.player-overlay span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 42px rgba(239, 68, 68, 0.42);
    font-size: 38px;
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    color: #374151;
    background: #f3f4f6;
    font-weight: 800;
    font-size: 13px;
}

.one-line {
    margin: 18px 0;
    color: #374151;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.8;
}

.detail-card section {
    margin-top: 28px;
}

.detail-card h2,
.side-card h2,
.site-footer h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: #4b5563;
    font-size: 16px;
    line-height: 2;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 92px;
}

.side-rank .rank-row {
    grid-template-columns: 34px 78px 1fr;
}

.rank-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 58px;
    background: #111827;
}

.rank-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18));
}

.rank-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

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

.footer-grid {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 0.8fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    border-radius: 999px;
    padding: 8px 12px;
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.08);
}

.copyright {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
    text-align: center;
}

.movie-card.hidden-card {
    display: none;
}

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

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

    .search-form {
        display: none;
    }

    .mobile-search input {
        flex: 1;
        width: auto;
    }

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

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

    .detail-layout,
    .split-section,
    .library-hero {
        grid-template-columns: 1fr;
    }

    .detail-side .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        height: 62px;
    }

    .brand {
        font-size: 19px;
    }

    .hero-stage {
        height: 540px;
    }

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

    .hero-arrow {
        display: none;
    }

    .quick-strip,
    .movie-grid,
    .category-list,
    .mini-grid,
    .featured-grid,
    .category-grid,
    .footer-grid,
    .full-rank {
        grid-template-columns: 1fr;
    }

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

    .page-hero,
    .rank-hero {
        padding: 34px 22px;
        border-radius: 24px;
    }

    .rank-row {
        grid-template-columns: 34px 72px 1fr;
    }

    .detail-card,
    .side-card,
    .rank-panel,
    .editor-panel {
        padding: 20px;
    }
}
