/* ── Variables ─────────────────────────────────── */
:root {
    --bg:       #0c0c0e;
    --surface:  #141416;
    --surface2: #1c1c20;
    --border:   rgba(255,255,255,0.07);
    --accent:   #e05a2b;
    --accent2:  #f07a4b;
    --text:     #f0ede8;
    --muted:    #7a7875;
    --sub:      #a09d99;
    --radius:   10px;
    --font-head: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    min-height: 100vh;
    line-height: 1.5;
}

/* ── Header ────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 0 40px;
    height: 60px;
    background: rgba(12,12,14,0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    flex-shrink: 0;
    text-decoration: none;
}

.logo::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 8px;
    vertical-align: 1px;
}

.nav-links {
    display: flex;
    gap: 6px;
    flex: 1;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 7px;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--text); }

.header-right { margin-left: auto; }

#pfp {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    display: block;
}

/* ── Hero ──────────────────────────────────────── */
#hero {
    position: relative;
    height: 540px;
    margin-top: 60px;
    overflow: hidden;
    background: var(--surface);
}

#hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    transform: scale(1.04);
    transition: background-image 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

#hero-bg.loaded { opacity: 1; }

#hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(12,12,14,0.95) 30%,
        rgba(12,12,14,0.5) 65%,
        rgba(12,12,14,0.1) 100%
    ),
    linear-gradient(
        to top,
        rgba(12,12,14,1) 0%,
        rgba(12,12,14,0) 40%
    );
}

#hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 48px 52px;
    max-width: 640px;
}

#hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.hero-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(224,90,43,0.15);
    border: 1px solid rgba(224,90,43,0.25);
    color: var(--accent2);
}

.hero-tag.neutral {
    background: var(--surface2);
    border-color: var(--border);
    color: var(--sub);
}

#hero-title {
    font-family: var(--font-head);
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.08;
    color: var(--text);
    margin-bottom: 14px;
}

#hero-synopsis {
    font-size: 14px;
    color: var(--sub);
    line-height: 1.7;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}

.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

#hero-meta-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-chip {
    font-size: 12px;
    font-weight: 500;
    color: var(--sub);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── Section header ────────────────────────────── */
#main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 40px 80px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}

.count-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 2px 9px;
    border-radius: 20px;
}

/* ── Show grid ─────────────────────────────────── */
.show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

/* ── Show card ─────────────────────────────────── */
.show-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
    cursor: pointer;
}

.show-card:hover {
    transform: translateY(-4px);
    border-color: rgba(224,90,43,0.3);
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

.card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--surface2);
    overflow: hidden;
    flex-shrink: 0;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.show-card:hover .card-poster img {
    transform: scale(1.04);
}

.card-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface2);
}

.card-poster-placeholder svg {
    opacity: 0.15;
}

/* Play overlay on hover */
.card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12,12,14,0.5);
    opacity: 0;
    transition: opacity 0.18s;
}

.show-card:hover .card-play-overlay { opacity: 1; }

.play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.85);
    transition: transform 0.18s;
}

.show-card:hover .play-circle { transform: scale(1); }

.card-score {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(12,12,14,0.75);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text);
}

.card-score .star { color: var(--accent2); margin-right: 2px; }

.card-body {
    padding: 12px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-sub {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Skeleton cards ─────────────────────────────── */
@keyframes shimmer {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.6; }
}

.card-skeleton {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

.skel-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--surface2);
    animation: shimmer 1.5s ease infinite;
}

.skel-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skel-line {
    height: 12px;
    border-radius: 4px;
    background: var(--surface2);
    animation: shimmer 1.5s ease infinite;
}

.skel-line.short { width: 55%; }

/* ── Footer ────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 40px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}

.footer-sub {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.6;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 700px) {
    #hero-content { padding: 0 24px 40px; }
    #hero-title { font-size: 30px; }
    #main { padding: 32px 20px 60px; }
    header { padding: 0 20px; gap: 16px; }
    .show-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* ── Card progress bar (Continue Watching) ──────── */
.card-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.12);
}

.card-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 0 2px 0 0;
}

/* ── Card media chips (CC / Dub counts) ─────────── */
.card-media-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.card-media-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 20px;
}

.card-media-chip.dub {
    color: var(--accent2);
    background: rgba(224,90,43,0.08);
    border-color: rgba(224,90,43,0.2);
}