:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #f97316;
    --orange-deep: #ea580c;
    --amber: #f59e0b;
    --amber-soft: #fef3c7;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    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: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
    border-bottom: 1px solid rgba(251, 146, 60, 0.22);
    box-shadow: 0 10px 30px rgba(146, 64, 14, 0.10);
    backdrop-filter: blur(16px);
}

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

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
    transition: transform 0.2s ease;
}

.logo:hover .logo-icon {
    transform: scale(1.08) rotate(-5deg);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a,
.mobile-nav a {
    border-radius: 12px;
    color: #374151;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a {
    padding: 9px 14px;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(251, 146, 60, 0.12);
    color: #9a3412;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 18px;
}

.mobile-nav a {
    padding: 12px 14px;
}

.main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5 0%, #fffbeb 45%, #fef3c7 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(48px);
    opacity: 0.35;
    pointer-events: none;
}

.hero::before {
    width: 280px;
    height: 280px;
    left: 6%;
    top: 9%;
    background: var(--orange);
}

.hero::after {
    width: 320px;
    height: 320px;
    right: 8%;
    bottom: 10%;
    background: var(--amber);
}

.hero-slide {
    display: none;
    position: relative;
    z-index: 2;
    min-height: 520px;
    align-items: center;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 38px;
    padding: 58px 0;
}

.hero-slide.active {
    display: grid;
}

.hero-copy {
    max-width: 670px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #9a3412;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(251, 146, 60, 0.24);
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(251, 146, 60, 0.12);
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 18px 0 18px;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.045em;
    color: #1f2937;
}

.gradient-text {
    color: transparent;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero p {
    max-width: 620px;
    margin: 0 0 28px;
    font-size: 19px;
    color: #4b5563;
}

.hero-actions,
.card-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 13px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.26);
}

.button.secondary {
    color: #374151;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.95);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.hero-art {
    position: relative;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    border-radius: 32px;
    box-shadow: var(--shadow);
    isolation: isolate;
    background: #111827;
}

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

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.78));
    z-index: 1;
}

.hero-poster-info {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    color: #fff;
}

.hero-poster-info strong {
    display: block;
    margin-bottom: 6px;
    font-size: 24px;
    line-height: 1.2;
}

.hero-poster-info span {
    color: rgba(255, 255, 255, 0.82);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.28);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 32px;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(570px, 100%);
    margin-top: 26px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(251, 146, 60, 0.20);
    box-shadow: 0 18px 34px rgba(146, 64, 14, 0.10);
}

.hero-search input,
.search-input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #111827;
    background: #fff;
}

.hero-search input {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: transparent;
}

.section {
    padding: 68px 0;
}

.section.alt {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

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

.section-title {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-desc {
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.78);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.15);
    border-color: rgba(251, 146, 60, 0.35);
}

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

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

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

.poster-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 44px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.24s ease, background 0.24s ease;
}

.movie-card:hover .poster-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.32);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.poster .badge {
    position: absolute;
    right: 12px;
    top: 12px;
    color: #fff;
    background: var(--orange);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.30);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 17px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    color: #1f2937;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--orange);
}

.card-desc {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    color: #6b7280;
    font-size: 13px;
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

.category-card {
    display: block;
    min-height: 170px;
    padding: 26px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #fb923c, #f59e0b);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #f97316, #facc15);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 46px rgba(249, 115, 22, 0.25);
}

.category-icon {
    display: block;
    margin-bottom: 14px;
    font-size: 42px;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 9px 22px rgba(15, 23, 42, 0.07);
    border: 1px solid rgba(229, 231, 235, 0.78);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13);
}

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

.rank-thumb {
    width: 96px;
    height: 62px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--amber-soft);
}

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

.rank-item h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 50px;
    color: #1f2937;
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background: radial-gradient(circle at 20% 20%, #fff 0, transparent 25%), radial-gradient(circle at 80% 0%, #fff 0, transparent 22%);
}

.page-hero .section-inner {
    position: relative;
}

.page-hero h1 {
    color: #fff;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.86);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.search-wrap {
    position: relative;
}

.search-input {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
}

.filter-button {
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #374151;
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 750;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-button.active,
.filter-button:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.empty-state {
    display: none;
    padding: 52px 20px;
    text-align: center;
    border-radius: 24px;
    background: #fff;
    color: var(--muted);
    border: 1px solid rgba(229, 231, 235, 0.86);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.84);
    font-weight: 650;
}

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

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

.player-card,
.detail-card,
.sidebar-card {
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(229, 231, 235, 0.82);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    transition: opacity 0.24s ease;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 22px 42px rgba(249, 115, 22, 0.35);
}

.player-caption {
    padding: 20px 22px;
}

.player-caption h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.player-caption p {
    margin: 0;
    color: var(--muted);
}

.detail-card {
    padding: 26px;
}

.detail-card h2,
.sidebar-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-card p {
    margin: 0 0 18px;
    color: #4b5563;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

.meta-chip,
.tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.sidebar-card {
    padding: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-thumb {
    width: 92px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #fed7aa;
}

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

.related-item h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.35;
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 40px;
    padding: 52px 0 34px;
    color: #d1d5db;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-title {
    margin: 0 0 13px;
    color: #fff;
    font-size: 18px;
}

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

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

.copyright {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #9ca3af;
}

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

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

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

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-slide,
    .hero-slide.active {
        grid-template-columns: 1fr;
        padding: 42px 0 72px;
    }

    .hero-poster-card,
    .hero-poster-card img {
        min-height: 300px;
        height: 300px;
    }

    .section-heading,
    .filter-panel {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

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

    .rank-item .button {
        grid-column: 2 / -1;
        width: fit-content;
    }

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

@media (max-width: 640px) {
    .header-inner,
    .section-inner,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .logo {
        font-size: 19px;
    }

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

    .hero,
    .hero-slide {
        min-height: auto;
    }

    .hero h1,
    .page-hero h1,
    .detail-title {
        font-size: 34px;
    }

    .hero-search {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

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

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

    .section {
        padding: 48px 0;
    }

    .page-hero {
        padding: 50px 0 34px;
    }

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

    .rank-thumb {
        display: none;
    }

    .rank-item .button {
        grid-column: 2 / -1;
    }

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