:root {
    --primary-50: #fef7ee;
    --primary-100: #fdecd3;
    --primary-400: #f38d33;
    --primary-500: #f07315;
    --primary-600: #e1590b;
    --primary-700: #bb420b;
    --accent-50: #fdf8f3;
    --accent-500: #d9804f;
    --secondary-500: #0fcaaa;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-400: #a8a29e;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
    --shadow-md: 0 12px 30px rgba(28, 25, 23, 0.1);
    --shadow-lg: 0 18px 45px rgba(28, 25, 23, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--neutral-800);
    background: var(--neutral-50);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100% - 32px, 1200px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(231, 229, 228, 0.75);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(240, 115, 21, 0.25);
}

.brand-name {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    flex: 1;
}

.nav-link,
.mobile-link {
    color: var(--neutral-600);
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary-600);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    background: #fff;
}

.header-search input,
.mobile-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    color: var(--neutral-800);
    background: transparent;
}

.header-search button,
.mobile-search button {
    border: 0;
    padding: 10px 14px;
    color: #fff;
    background: var(--primary-600);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--neutral-100);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--neutral-700);
    border-radius: 999px;
}

.mobile-panel {
    padding: 0 16px 18px;
    border-top: 1px solid var(--neutral-200);
}

.mobile-panel nav {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.mobile-link {
    display: block;
    padding: 12px;
    border-radius: 12px;
    background: var(--neutral-50);
}

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

.hero-section {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500), var(--secondary-500));
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-container {
    position: relative;
    z-index: 1;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-slider {
    position: relative;
    width: 100%;
}

.hero-slide {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-slide.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

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

.eyebrow,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--primary-100);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 640px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 20px;
}

.hero-tags,
.detail-tags,
.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    color: #fff;
    background: var(--primary-600);
    box-shadow: 0 14px 30px rgba(187, 66, 11, 0.26);
}

.button.primary:hover {
    background: var(--primary-700);
}

.button.ghost {
    color: var(--primary-700);
    background: #fff;
}

.button.ghost.dark {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-poster {
    position: relative;
    width: min(36vw, 420px);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.64);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 34px;
}

.hero-controls button {
    display: grid;
    min-width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

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

.hero-dot {
    min-width: 10px !important;
    width: 10px;
    height: 10px !important;
    padding: 0;
    background: rgba(255, 255, 255, 0.4) !important;
}

.hero-dot.active {
    width: 28px;
    background: #fff !important;
}

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

.section-heading {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-heading.left {
    margin-left: 0;
    text-align: left;
}

.section-heading span {
    color: var(--primary-600);
}

.section-heading h2,
.page-hero h1,
.content-card h2,
.player-card h2,
.side-card h2 {
    margin: 0 0 12px;
    color: var(--neutral-800);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    margin: 0;
    color: var(--neutral-600);
}

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

.catalog-grid {
    align-items: stretch;
}

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(231, 229, 228, 0.8);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--neutral-200);
}

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

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

.poster-link::after {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.62));
    transition: opacity 0.25s ease;
}

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

.poster-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    padding: 4px 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    color: #fff;
    opacity: 0;
    background: rgba(240, 115, 21, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--neutral-800);
    font-size: 17px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
    color: var(--primary-600);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--neutral-500);
    font-size: 12px;
}

.tag-row span {
    min-height: 24px;
    color: var(--primary-700);
    background: var(--primary-50);
}

.soft-section {
    background: linear-gradient(135deg, var(--accent-50), var(--primary-50));
}

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

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

.category-tile {
    display: grid;
    min-height: 180px;
    align-content: start;
    gap: 12px;
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(231, 229, 228, 0.8);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 14px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--neutral-800);
    font-size: 20px;
}

.category-tile em {
    color: var(--neutral-600);
    font-style: normal;
    font-size: 14px;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.ranking-list,
.latest-list,
.ranking-page-list,
.side-list {
    display: grid;
    gap: 16px;
}

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

.compact-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid rgba(231, 229, 228, 0.86);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.compact-poster {
    position: relative;
    width: 132px;
    aspect-ratio: 16 / 10;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: var(--neutral-200);
}

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

.compact-info {
    display: grid;
    align-content: center;
    min-width: 0;
}

.compact-info strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--neutral-800);
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-info em {
    margin: 4px 0;
    color: var(--primary-600);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.compact-info span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--neutral-500);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    color: #fff;
    background: var(--primary-600);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.text-link {
    display: inline-flex;
    margin-top: 20px;
    color: var(--primary-600);
    font-weight: 800;
}

.page-hero {
    color: #fff;
    background: linear-gradient(135deg, var(--neutral-900), var(--primary-700));
}

.page-hero .container {
    padding: 70px 0;
}

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

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

.filter-panel {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid rgba(231, 229, 228, 0.88);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.filter-grid label {
    display: grid;
    gap: 6px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    outline: 0;
    padding: 0 12px;
    color: var(--neutral-800);
    background: #fff;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(240, 115, 21, 0.12);
}

.filter-grid button {
    height: 44px;
    border: 0;
    padding: 0 18px;
    color: #fff;
    background: var(--primary-600);
    border-radius: 12px;
    font-weight: 800;
}

.empty-state {
    padding: 40px;
    color: var(--neutral-500);
    text-align: center;
    background: #fff;
    border: 1px dashed var(--neutral-300);
    border-radius: 18px;
}

.detail-top {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--neutral-900);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.detail-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 58px 0;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-poster span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    color: #fff;
    background: rgba(240, 115, 21, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 860px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

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

.detail-meta span {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-card,
.content-card,
.side-card {
    background: #fff;
    border: 1px solid rgba(231, 229, 228, 0.86);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.player-card,
.content-card {
    padding: 24px;
}

.side-card {
    position: sticky;
    top: 86px;
    padding: 20px;
}

.player-card h2,
.content-card h2,
.side-card h2 {
    font-size: 24px;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background-size: cover;
    background-position: center;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-cover-text {
    position: absolute;
    left: 24px;
    bottom: 24px;
    max-width: calc(100% - 48px);
    font-size: clamp(22px, 4vw, 38px);
    font-weight: 900;
    line-height: 1.15;
    text-align: left;
}

.player-play-button {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    padding-left: 5px;
    color: #fff;
    background: rgba(240, 115, 21, 0.94);
    border-radius: 999px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    font-size: 28px;
}

.content-card p {
    margin: 0;
    color: var(--neutral-700);
    font-size: 16px;
}

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-800);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-brand {
    margin-bottom: 14px;
    color: #fff;
    font-size: 20px;
}

.site-footer p,
.site-footer a,
.site-footer li {
    color: var(--neutral-400);
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--primary-400);
}

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

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

.footer-bottom {
    padding: 18px;
    color: var(--neutral-400);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-search {
        display: none;
    }

    .hero-slide.active {
        flex-direction: column;
        align-items: flex-start;
        padding: 46px 0;
    }

    .hero-container {
        min-height: auto;
    }

    .hero-poster {
        width: min(100%, 340px);
    }

    .movie-grid,
    .category-grid,
    .category-grid.large,
    .ranking-page-list,
    .two-columns,
    .footer-grid,
    .detail-hero-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-section {
        min-height: auto;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy p,
    .detail-one-line {
        font-size: 16px;
    }

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

    .movie-grid {
        gap: 16px;
    }

    .compact-card {
        align-items: flex-start;
    }

    .compact-poster {
        width: 104px;
    }

    .player-cover-text {
        display: none;
    }

    .player-play-button {
        width: 66px;
        height: 66px;
    }
}
