:root {
    --teal: #0d9488;
    --teal-light: #14b8a6;
    --blue: #2563eb;
    --blue-light: #38bdf8;
    --ink: #111827;
    --muted: #6b7280;
    --paper: #ffffff;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--teal-light), var(--blue));
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.25);
    font-size: 18px;
}

.brand-mark.small {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-text em {
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
}

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

.nav-link {
    position: relative;
    color: #374151;
    font-weight: 700;
    padding: 10px 0;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 3px;
    height: 3px;
    border-radius: 99px;
    background: var(--teal);
    transition: right 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--teal);
}

.nav-link:hover::after,
.nav-link.active::after {
    right: 0;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    padding: 11px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #334155;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: #374151;
    font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
    background: #ecfeff;
    color: var(--teal);
}

main {
    min-height: 60vh;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 15% 15%, rgba(20, 184, 166, 0.65), transparent 36%),
                linear-gradient(135deg, #0f766e 0%, #2563eb 55%, #1d4ed8 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.75) 1px, transparent 1px);
    background-size: 30px 30px;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: saturate(1.1) contrast(1.05);
}

.hero-backdrop img.cover-missing {
    opacity: 0;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0.68));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 54px;
    align-items: center;
    padding: 80px 0 120px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.hero-copy p {
    max-width: 780px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(17px, 2.4vw, 24px);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button.primary {
    color: var(--blue);
    background: #fff;
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.22);
}

.button.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(12px);
}

.hero-panel {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(16px);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.28);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.45), rgba(37, 99, 235, 0.65));
}

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

.hero-poster img.cover-missing {
    opacity: 0;
}

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 20px 20px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

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

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
    width: 34px;
    border-radius: 999px;
    background: #fff;
}

.hero-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    background: linear-gradient(180deg, transparent, #f8fafc);
}

.page-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 780px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ecfeff, #eff6ff);
    color: #334155;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.film-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.film-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.film-card.compact {
    border-radius: 18px;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

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

.poster-link img.cover-missing {
    opacity: 0;
}

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

.score,
.play-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.score {
    top: 12px;
    right: 12px;
    color: #fff7ed;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.play-badge {
    left: 12px;
    bottom: 12px;
    color: #fff;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.22s ease;
}

.film-card:hover .play-badge {
    opacity: 1;
    transform: translateY(0);
}

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

.film-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.35;
}

.film-card h3 a:hover {
    color: var(--teal);
}

.meta,
.genre-line,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.genre-line {
    color: #475569;
}

.card-desc {
    margin-top: 8px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 160px 160px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--ink);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--teal-light);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.filter-panel button,
.load-more {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    font-weight: 900;
    cursor: pointer;
}

.filter-empty {
    display: none;
    padding: 28px;
    border-radius: 18px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.category-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    overflow: hidden;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.category-thumbs img.cover-missing {
    opacity: 0;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.category-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 80px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.rank-no {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    font-size: 20px;
    font-weight: 1000;
}

.rank-cover {
    width: 80px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.rank-cover.cover-missing {
    opacity: 0;
}

.rank-info h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.rank-info h2 a:hover {
    color: var(--teal);
}

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

.rank-score {
    text-align: right;
    color: #f97316;
    font-size: 20px;
    font-weight: 1000;
}

.detail-hero {
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #0f766e 45%, #1d4ed8);
}

.detail-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 56px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-poster img.cover-missing {
    opacity: 0;
}

.detail-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

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

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
}

.detail-copy .one-line {
    max-width: 850px;
    margin: 0 0 24px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.player-wrap {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at 30% 20%, rgba(20, 184, 166, 0.28), transparent 32%), #020617;
}

.video-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.poster-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.42));
    transition: opacity 0.2s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
    cursor: pointer;
}

.player-caption {
    padding: 16px 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.content-card {
    padding: 26px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
    color: var(--ink);
}

.content-card p {
    margin: 0;
    color: #334155;
}

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

.sidebar-list {
    display: grid;
    gap: 12px;
}

.side-link {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
}

.side-link:hover {
    background: #ecfeff;
}

.side-link img {
    width: 70px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.side-link img.cover-missing {
    opacity: 0;
}

.side-link strong {
    display: block;
    line-height: 1.3;
}

.side-link span {
    color: var(--muted);
    font-size: 13px;
}

.pagination-note {
    margin: 28px 0 0;
    color: var(--muted);
    text-align: center;
}

.site-footer {
    margin-top: 64px;
    color: #e5e7eb;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 20px;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: #cbd5e1;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

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

.footer-links a {
    color: #cbd5e1;
}

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

.copyright {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .film-grid,
    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-content,
    .detail-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 460px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        height: 68px;
    }

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

    .brand-text em {
        display: none;
    }

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

    .hero-content {
        padding: 48px 0 96px;
        gap: 28px;
    }

    .hero-panel {
        display: none;
    }

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

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

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

    .rank-score {
        grid-column: 3;
        text-align: left;
        font-size: 16px;
    }

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

    .detail-inner {
        gap: 24px;
    }

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

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

    .page-section {
        padding: 44px 0;
    }

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