:root {
    --ash-50: #f8f9fa;
    --ash-100: #f1f3f5;
    --ash-200: #dee2e6;
    --ash-300: #ced4da;
    --ash-400: #adb5bd;
    --ash-500: #6c757d;
    --ash-600: #495057;
    --ash-700: #343a40;
    --ash-800: #212529;
    --ash-900: #0d0f12;
    --volcanic-50: #fef5f1;
    --volcanic-100: #fdeae1;
    --volcanic-600: #f07f4a;
    --volcanic-700: #ee692c;
    --volcanic-800: #e84118;
    --volcanic-900: #c03711;
    --lava-50: #fff5e6;
    --lava-100: #ffe6b3;
    --lava-400: #ffb81a;
    --lava-600: #e68a00;
    --shadow: 0 14px 35px rgba(13, 15, 18, 0.12);
    --shadow-strong: 0 24px 60px rgba(232, 65, 24, 0.32);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, var(--ash-50), #ffffff 42%, #ffffff);
    color: var(--ash-900);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--volcanic-800), var(--volcanic-900));
    box-shadow: 0 14px 30px rgba(192, 55, 17, 0.28);
}

.nav-bar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--lava-400);
    background: rgba(255, 255, 255, 0.11);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    background: rgba(255, 184, 26, 0.18);
    filter: blur(12px);
    z-index: -1;
}

.brand-mark svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.brand-mark.small {
    width: 34px;
    height: 34px;
}

.brand-mark.small svg {
    width: 20px;
    height: 20px;
}

.brand-text,
.footer-logo div {
    display: grid;
    gap: 2px;
}

.brand-text strong,
.footer-logo strong {
    font-family: Poppins, Inter, sans-serif;
    font-size: 24px;
    line-height: 1;
    color: #ffffff;
}

.brand-text small,
.footer-logo small {
    color: var(--volcanic-100);
    font-size: 12px;
}

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

.nav-links a {
    color: #ffffff;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--lava-400);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 999px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--ash-900);
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(13, 15, 18, 0.98) 0%, rgba(13, 15, 18, 0.55) 48%, rgba(13, 15, 18, 0.08) 100%),
        linear-gradient(90deg, rgba(13, 15, 18, 0.78) 0%, rgba(13, 15, 18, 0.25) 55%, rgba(13, 15, 18, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 72px;
}

.hero-copy {
    width: min(780px, 100%);
    color: #ffffff;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.tag-list span {
    background: var(--volcanic-100);
    color: var(--volcanic-700);
}

.hero h1,
.page-hero h1,
.detail-main h1 {
    margin: 18px 0 16px;
    font-family: Poppins, Inter, sans-serif;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--ash-200);
    font-size: 18px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--volcanic-600), var(--volcanic-700));
    box-shadow: var(--shadow-strong);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.search-panel {
    margin-top: 36px;
    padding: 24px;
    border: 1px solid var(--ash-200);
    border-radius: 24px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 24px;
    align-items: end;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-family: Poppins, Inter, sans-serif;
}

.search-panel p {
    margin: 0;
    color: var(--ash-600);
    line-height: 1.7;
}

.search-panel label {
    display: grid;
    gap: 8px;
    color: var(--ash-700);
    font-weight: 750;
}

.search-panel input,
.search-panel select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--ash-300);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--ash-900);
    background: #ffffff;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--volcanic-600);
    box-shadow: 0 0 0 4px rgba(240, 127, 74, 0.16);
}

.listing-tools {
    grid-template-columns: 1fr 220px;
}

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

.section-heading {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    white-space: nowrap;
    font-size: clamp(25px, 4vw, 34px);
    font-family: Poppins, Inter, sans-serif;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.section-heading span {
    height: 4px;
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--volcanic-600), rgba(240, 127, 74, 0));
}

.section-heading.reverse span {
    background: linear-gradient(270deg, var(--volcanic-600), rgba(240, 127, 74, 0));
}

.section-heading a {
    flex: 0 0 auto;
    color: var(--volcanic-700);
    font-weight: 800;
}

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

.poster-card {
    display: grid;
    gap: 10px;
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: var(--ash-200);
    box-shadow: var(--shadow);
}

.poster-frame img,
.wide-cover img,
.rank-thumb img,
.info-card img,
.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--volcanic-600);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.movie-card:hover img,
.rank-item:hover img,
.category-card:hover img {
    transform: scale(1.06);
}

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

.poster-card strong {
    color: var(--ash-900);
    font-size: 15px;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.poster-card small {
    color: var(--ash-600);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card:hover strong,
.wide-card:hover strong,
.rank-item:hover strong {
    color: var(--volcanic-700);
}

.category-strip {
    padding: 58px 0;
    background: linear-gradient(135deg, var(--volcanic-50), var(--lava-50));
}

.category-strip:nth-of-type(even) {
    background: #ffffff;
}

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

.wide-card {
    overflow: hidden;
    border-radius: 20px;
    display: grid;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wide-card:hover,
.poster-card:hover,
.rank-item:hover,
.category-card:hover {
    transform: translateY(-4px);
}

.wide-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ash-200);
}

.wide-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
}

.wide-cover span {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 34px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wide-card:hover .wide-cover::after {
    background: rgba(0, 0, 0, 0.22);
}

.wide-card:hover .wide-cover span {
    opacity: 1;
}

.wide-copy {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.wide-copy strong {
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.wide-copy em,
.rank-copy em {
    color: var(--ash-600);
    font-style: normal;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wide-copy small,
.rank-copy small {
    color: var(--ash-500);
    font-size: 13px;
}

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

.latest-list .wide-card {
    grid-template-columns: 260px 1fr;
}

.latest-list .wide-cover {
    aspect-ratio: 16 / 10;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 138px 1fr;
    gap: 16px;
    align-items: stretch;
    overflow: hidden;
    min-height: 146px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-800));
    font-size: 30px;
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    background: var(--ash-200);
}

.rank-copy {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px 18px 16px 0;
}

.rank-copy strong {
    font-size: 20px;
    transition: color 0.2s ease;
}

.page-hero {
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(232, 65, 24, 0.96), rgba(192, 55, 17, 0.96)),
        radial-gradient(circle at top right, rgba(255, 184, 26, 0.35), transparent 38%);
}

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

.small-hero .container {
    padding: 64px 0;
}

.page-hero h1 {
    margin-top: 12px;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--volcanic-100);
    font-size: 18px;
    line-height: 1.75;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 700;
}

.detail-main .breadcrumb {
    color: var(--ash-500);
    margin-bottom: 12px;
}

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

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

.category-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-thumbs {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 8px;
    height: 150px;
    overflow: hidden;
    border-radius: 18px;
}

.category-thumbs img {
    min-width: 0;
    border-radius: 12px;
    background: var(--ash-200);
}

.category-card strong {
    font-size: 22px;
    color: var(--ash-900);
}

.category-card em {
    color: var(--ash-600);
    font-style: normal;
    line-height: 1.7;
}

.category-card > span:last-child {
    color: var(--volcanic-700);
    font-weight: 850;
}

.empty-state {
    display: none;
    padding: 44px;
    border: 1px solid var(--ash-200);
    border-radius: 22px;
    color: var(--ash-600);
    text-align: center;
    background: #ffffff;
}

.empty-state.show {
    display: block;
}

.player-wrap {
    padding: 32px 0;
    background: #000000;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.44);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-800));
    box-shadow: var(--shadow-strong);
    font-size: 36px;
}

.player-card.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    padding: 42px 0 24px;
}

.detail-main,
.info-card {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-main {
    padding: 30px;
}

.detail-main h1 {
    font-size: clamp(30px, 5vw, 42px);
    color: var(--ash-900);
}

.lead {
    margin: 0 0 24px;
    color: var(--ash-700);
    font-size: 19px;
    line-height: 1.75;
    font-style: italic;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--ash-700);
    background: var(--ash-100);
    font-weight: 750;
    font-size: 14px;
}

.detail-main .tag-list {
    margin-bottom: 26px;
}

.text-panel {
    padding-top: 24px;
    border-top: 1px solid var(--ash-200);
}

.text-panel + .text-panel {
    margin-top: 24px;
}

.text-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
    color: var(--ash-900);
}

.text-panel p {
    margin: 0;
    color: var(--ash-700);
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-line;
}

.review-panel p {
    padding: 22px;
    border-radius: 18px;
    background: var(--ash-50);
}

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

.info-card {
    position: sticky;
    top: 104px;
    overflow: hidden;
}

.info-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--ash-200);
}

.info-card dl {
    margin: 0;
    padding: 22px;
    display: grid;
    gap: 12px;
}

.info-card dt {
    color: var(--ash-500);
    font-size: 13px;
}

.info-card dd {
    margin: -8px 0 4px;
    color: var(--ash-900);
    font-weight: 800;
}

.info-card a {
    color: var(--volcanic-700);
}

.related-block {
    padding-top: 24px;
}

.site-footer {
    margin-top: 40px;
    background: var(--ash-900);
    color: var(--ash-300);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 42px;
    padding: 46px 0;
}

.footer-brand p {
    max-width: 520px;
    color: var(--ash-400);
    line-height: 1.75;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer a {
    display: block;
    margin: 9px 0;
    color: var(--ash-400);
}

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

.footer-bottom {
    padding: 20px;
    border-top: 1px solid var(--ash-800);
    color: var(--ash-500);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1040px) {
    .poster-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

    .info-card {
        position: static;
        display: grid;
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 820px) {
    .nav-bar {
        min-height: 66px;
    }

    .brand-text strong {
        font-size: 20px;
    }

    .brand-text small {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border-radius: 20px;
        background: rgba(13, 15, 18, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero {
        height: 520px;
    }

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

    .hero p {
        font-size: 16px;
        -webkit-line-clamp: 3;
    }

    .search-panel,
    .listing-tools {
        grid-template-columns: 1fr;
    }

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

    .latest-list .wide-card,
    .rank-item,
    .info-card {
        grid-template-columns: 1fr;
    }

    .rank-thumb {
        aspect-ratio: 16 / 9;
    }

    .rank-copy {
        padding: 0 18px 18px;
    }

    .rank-number {
        min-height: 56px;
    }

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

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

    .hero {
        height: 500px;
    }

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

    .hero-actions a {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .section-heading span {
        display: none;
    }

    .poster-grid,
    .wide-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
    }

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

    .detail-main {
        padding: 22px;
    }

    .play-overlay span {
        width: 66px;
        height: 66px;
        font-size: 30px;
    }

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