:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-900: #14532d;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f9fafb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

body {
    min-height: 100vh;
    background: var(--soft);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
    background: linear-gradient(135deg, #064e3b, #16a34a 55%, #86efac);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--green-700);
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green-600), var(--green-900));
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.26);
}

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 650;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--green-700);
    background: var(--green-50);
}

.top-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.top-search input,
.wide-search input,
.filter-controls input,
.filter-controls select {
    border: 0;
    outline: none;
    background: transparent;
}

.top-search input {
    width: 180px;
    padding: 10px 4px 10px 16px;
}

.top-search button,
.wide-search button,
.primary-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.wide-search button:hover,
.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(22, 163, 74, 0.28);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #ffffff;
}

.hero-carousel {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #052e16;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48) 44%, rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
}

.eyebrow {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #bbf7d0;
}

.eyebrow.green {
    color: var(--green-600);
}

.hero-content h1 {
    max-width: 780px;
    margin-bottom: 12px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content h2 {
    margin-bottom: 16px;
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 850;
}

.hero-summary {
    max-width: 700px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 750;
}

.hero-tags span {
    color: #dcfce7;
    border: 1px solid rgba(187, 247, 208, 0.28);
    background: rgba(20, 83, 45, 0.35);
}

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

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.20);
    transform: translateY(-1px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 4;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-size: 30px;
    pointer-events: auto;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
    background: #ffffff;
}

.home-search-panel,
.section-wrap,
.split-section,
.filter-panel,
.category-overview-grid,
.detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-panel {
    position: relative;
    z-index: 5;
    margin-top: -54px;
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px);
    gap: 22px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(187, 247, 208, 0.8);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.home-search-panel h2,
.section-head h2,
.page-hero h1,
.content-panel h2,
.side-panel h2 {
    font-weight: 900;
    letter-spacing: -0.03em;
}

.home-search-panel h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.wide-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.wide-search input {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
}

.section-wrap,
.split-section,
.filter-panel,
.category-overview-grid {
    margin-top: 64px;
}

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

.section-head h2 {
    font-size: clamp(24px, 3vw, 36px);
}

.section-head a,
.text-link {
    color: var(--green-700);
    font-weight: 850;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5.45;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #15803d);
}

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

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

.score-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(21, 128, 61, 0.92);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.score-pill {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    font-size: 12px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.movie-card-body {
    padding: 16px;
}

.movie-meta {
    margin-bottom: 10px;
}

.movie-meta span,
.detail-meta span {
    color: var(--green-700);
    background: var(--green-50);
}

.movie-card h2 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #374151;
    background: #f3f4f6;
}

.movie-card.compact .movie-card-body {
    padding: 13px;
}

.movie-card.compact h2 {
    font-size: 15px;
}

.movie-card.compact p {
    font-size: 13px;
}

.split-section {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 24px;
}

.section-card,
.content-panel,
.side-panel,
.filter-panel,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.section-card {
    padding: 26px;
}

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

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

.rank-row,
.side-links a {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover,
.side-links a:hover {
    background: var(--green-50);
    transform: translateX(3px);
}

.rank-row span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: var(--green-600);
    font-weight: 900;
}

.rank-row em,
.side-links em {
    color: var(--green-700);
    font-style: normal;
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: #ffffff;
    isolation: isolate;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--tile-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.15));
}

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

.category-tile strong {
    margin-top: 6px;
    color: #e5e7eb;
    font-size: 13px;
    line-height: 1.6;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    padding: 46px;
    border-radius: 32px;
    overflow: hidden;
}

.page-hero.soft {
    border: 1px solid #bbf7d0;
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.page-hero.dark-soft {
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.65), transparent 34%), linear-gradient(135deg, #052e16, #111827);
}

.page-hero h1 {
    max-width: 820px;
    margin-bottom: 14px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
}

.page-hero.dark-soft p {
    color: #d1d5db;
}

.filter-panel {
    padding: 24px;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-controls input,
.filter-controls select {
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 22px;
    align-items: center;
    padding: 22px;
}

.category-overview-card h2 {
    margin-bottom: 8px;
    font-size: 26px;
    font-weight: 900;
}

.category-overview-card p {
    margin-bottom: 16px;
    color: var(--muted);
    line-height: 1.75;
}

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

.category-posters img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 116px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.ranking-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 5.45;
}

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

.ranking-poster b {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: var(--green-600);
}

.ranking-info h2 {
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 900;
}

.ranking-info p {
    margin-bottom: 12px;
    color: var(--muted);
    line-height: 1.7;
}

.ranking-score {
    width: 66px;
    height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green-600), var(--green-900));
    font-size: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 28px 0 18px;
    color: var(--muted);
    font-weight: 700;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 26px;
    align-items: stretch;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.16));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--green-700);
    background: #ffffff;
    font-size: 30px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.play-cover strong {
    font-size: 18px;
}

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

.player-card.error .play-cover {
    background: rgba(0, 0, 0, 0.72);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    border: 1px solid #bbf7d0;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.detail-info h1 {
    margin-bottom: 16px;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin-bottom: 20px;
    color: #374151;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin-top: 18px;
}

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

.content-panel,
.side-panel {
    padding: 28px;
}

.content-panel h2,
.side-panel h2 {
    margin-bottom: 14px;
    font-size: 26px;
}

.content-panel p {
    margin-bottom: 24px;
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

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

.side-links a {
    grid-template-columns: 1fr auto;
}

.related-section {
    width: 100%;
    margin-top: 40px;
}

.search-hero .wide-search {
    max-width: 680px;
    margin-top: 24px;
}

.empty-state {
    padding: 38px;
    border: 1px dashed #bbf7d0;
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.site-footer {
    margin-top: 76px;
    background: #052e16;
    color: #d1fae5;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 32px;
}

.footer-grid p {
    max-width: 520px;
    margin-top: 14px;
    color: #a7f3d0;
    line-height: 1.75;
}

.footer-grid h2 {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #d1fae5;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(209, 250, 229, 0.16);
    color: #86efac;
}

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

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

    .split-section,
    .detail-layout,
    .detail-hero,
    .home-search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .main-nav {
        display: none;
        width: 100%;
        margin-left: 0;
        padding: 8px 0 4px;
        border-top: 1px solid var(--line);
    }

    .main-nav.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-carousel {
        height: 78vh;
        min-height: 620px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

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

    .hero-controls {
        bottom: 18px;
    }

    .home-search-panel,
    .page-hero {
        padding: 24px;
        border-radius: 24px;
    }

    .wide-search,
    .filter-controls {
        grid-template-columns: 1fr;
        display: grid;
        border-radius: 22px;
    }

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

    .movie-grid,
    .compact-grid,
    .category-overview-grid,
    .category-grid.small {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .category-overview-card,
    .ranking-card {
        grid-template-columns: 1fr;
    }

    .ranking-poster {
        width: 130px;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions a {
        text-align: center;
    }

    .detail-info,
    .content-panel,
    .side-panel,
    .filter-panel,
    .section-card {
        padding: 20px;
    }
}
