:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --emerald-700: #047857;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --shadow-sm: 0 8px 24px rgba(41, 37, 36, 0.08);
    --shadow-lg: 0 24px 60px rgba(41, 37, 36, 0.16);
    --radius-lg: 18px;
    --radius-xl: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(231, 229, 228, 0.86);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, var(--green-600), var(--emerald-700));
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.28);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: var(--stone-500);
    font-size: 12px;
}

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

.nav-link {
    color: var(--stone-700);
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--stone-200);
    border-radius: 14px;
    background: var(--stone-50);
    overflow: hidden;
}

.header-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 11px 12px;
    background: transparent;
}

.header-search button {
    border: 0;
    color: #ffffff;
    font-weight: 700;
    padding: 11px 16px;
    background: var(--green-600);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--stone-700);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--stone-900);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 28%, rgba(34, 197, 94, 0.2), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.08) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.62) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 32px));
    margin-left: max(16px, calc((100vw - 1200px) / 2));
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
}

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

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

.hero-pills span:first-child {
    background: var(--green-600);
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 640px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: var(--green-600);
    box-shadow: 0 16px 32px rgba(22, 163, 74, 0.3);
}

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

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(135deg, var(--green-50), #ecfdf5 54%, var(--stone-50));
}

.section-featured {
    background: linear-gradient(180deg, #ffffff, var(--stone-50));
}

.section-heading {
    position: relative;
    display: grid;
    gap: 8px;
    margin-bottom: 32px;
}

.section-heading span,
.page-hero span,
.category-preview-head span {
    color: var(--green-600);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.category-preview-head h2 {
    margin: 0;
    color: var(--stone-800);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-heading p,
.page-hero p,
.category-preview-head p {
    max-width: 760px;
    margin: 0;
    color: var(--stone-600);
    font-size: 16px;
    line-height: 1.8;
}

.section-more {
    justify-self: start;
    margin-top: 8px;
    color: var(--green-700);
    font-weight: 800;
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--stone-200);
}

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

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

.card-type,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 4px 9px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: var(--green-600);
}

.card-type {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: rgba(28, 25, 23, 0.82);
    backdrop-filter: blur(8px);
}

.card-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.64));
    transition: opacity 0.22s ease;
}

.movie-card:hover .card-shade {
    opacity: 1;
}

.card-meta {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-meta {
    opacity: 1;
    transform: translateY(0);
}

.card-meta small {
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a {
    transition: color 0.2s ease;
}

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

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

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

.card-foot a {
    color: var(--green-700);
    font-weight: 800;
}

.card-foot span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-row span,
.detail-tags span,
.rank-tags span {
    padding: 5px 8px;
    border-radius: 8px;
    color: var(--stone-600);
    font-size: 12px;
    background: var(--stone-100);
}

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

.category-tile {
    display: grid;
    gap: 16px;
    min-height: 210px;
    padding: 24px;
    border: 1px solid rgba(231, 229, 228, 0.92);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.category-tile > a {
    display: grid;
    gap: 10px;
}

.category-tile span {
    color: var(--green-600);
    font-weight: 900;
}

.category-tile strong {
    color: var(--stone-800);
    font-size: 22px;
    line-height: 1.35;
}

.category-tile div {
    display: grid;
    gap: 8px;
}

.category-tile div a {
    color: var(--stone-600);
    font-size: 14px;
}

.category-tile div a:hover {
    color: var(--green-600);
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--stone-200);
    border-radius: 12px;
    outline: 0;
    padding: 12px 14px;
    color: var(--stone-700);
    background: var(--stone-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    overflow: hidden;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.rank-cover {
    display: block;
    min-height: 126px;
    background: var(--stone-200);
}

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

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

.rank-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    flex-shrink: 0;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 900;
    background: var(--green-600);
}

.rank-title-line h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.rank-title-line h3 a:hover {
    color: var(--green-600);
}

.rank-copy p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--stone-600);
    font-size: 14px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-hero {
    padding: 86px 0;
    background:
        radial-gradient(circle at 82% 20%, rgba(34, 197, 94, 0.18), transparent 28%),
        linear-gradient(135deg, var(--green-50), #ffffff 62%, var(--stone-100));
}

.small-hero,
.category-hero,
.rank-hero {
    border-bottom: 1px solid var(--stone-200);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    color: var(--stone-500);
    font-size: 14px;
}

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

.category-overview-list {
    display: grid;
    gap: 54px;
}

.category-preview {
    padding: 30px;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.category-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.detail-wrap {
    padding: 38px 0 30px;
    background: var(--stone-50);
}

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

.detail-main {
    display: grid;
    gap: 20px;
}

.detail-breadcrumb {
    margin: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--stone-900);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--stone-900);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.7));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 5px;
    color: #ffffff;
    font-size: 34px;
    background: var(--green-600);
    box-shadow: 0 20px 45px rgba(22, 163, 74, 0.36);
}

.player-cover strong {
    max-width: min(650px, calc(100% - 40px));
    text-align: center;
    font-size: clamp(20px, 4vw, 34px);
}

.detail-card,
.poster-panel {
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.detail-card {
    padding: 30px;
}

.detail-pills span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--stone-700);
    font-size: 13px;
    font-weight: 800;
    background: var(--green-50);
}

.detail-card h1 {
    margin: 18px 0 24px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.detail-card h2 {
    margin: 0 0 10px;
    color: var(--stone-800);
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: var(--stone-600);
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-line;
}

.detail-side {
    align-self: start;
    position: sticky;
    top: 100px;
}

.poster-panel {
    overflow: hidden;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--stone-200);
}

.poster-panel h2,
.poster-panel p,
.poster-panel .btn {
    margin-left: 20px;
    margin-right: 20px;
}

.poster-panel h2 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 22px;
}

.poster-panel p {
    color: var(--stone-600);
    line-height: 1.75;
}

.poster-panel .btn {
    margin-top: 18px;
    margin-bottom: 22px;
}

.site-footer {
    color: var(--stone-300);
    background: linear-gradient(135deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0 36px;
}

.footer-logo .brand-copy strong {
    color: #ffffff;
}

.footer-brand p {
    max-width: 420px;
    color: var(--stone-300);
    line-height: 1.8;
}

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

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

.footer-links a {
    color: var(--stone-300);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--green-500);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 18px;
    border-top: 1px solid rgba(214, 211, 209, 0.16);
    color: var(--stone-300);
    font-size: 14px;
}

.filter-card.is-hidden {
    display: none;
}

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

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 68px;
    }

    .brand-copy small {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 18px;
        border: 1px solid var(--stone-200);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow-lg);
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero {
        height: 76vh;
        min-height: 560px;
    }

    .hero-content {
        margin-left: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 54px 0;
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .all-movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .home-rank-list,
    .full-rank-list {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 112px 1fr;
    }

    .category-preview-head {
        flex-direction: column;
    }

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

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

    .brand-copy strong {
        font-size: 17px;
    }

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

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

    .hero-content {
        width: calc(100% - 24px);
    }

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

    .category-tile,
    .detail-card,
    .category-preview {
        padding: 20px;
    }

    .rank-item {
        grid-template-columns: 94px 1fr;
        gap: 12px;
    }

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

    .rank-tags span:nth-child(n+3) {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
