/* =============================================
   binge.css — film & tv page styles
   Matches existing site: black bg, white text
   Typography: EB Garamond + Geist Mono
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Geist+Mono:wght@300;400&display=swap');

header {
    justify-content: flex-end;
}

/* ── HERO ── */

.binge-hero {
    padding: 100px 0 40px;
    animation: fadeUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.binge-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(48px, 8vw, 90px);
    font-weight: 400;
    color: white;
    line-height: 1;
    letter-spacing: -0.01em;
}

/* ── FILTERS ── */

.binge-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    animation: fadeUp 0.9s 0.1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.filter-pill {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.filter-pill:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.filter-pill.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ── SHELF LABEL ── */

.shelf-label {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 48px;
    animation: fadeUp 0.9s 0.15s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.shelf-label span {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}

.shelf-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* ── SCREEN GRID ── */

.binge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 40px 32px;
    animation: fadeUp 0.9s 0.25s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ── SCREEN CARD ── */

.binge-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
}

.binge-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.binge-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Cover wrap — same 3D lift as books */

.binge-cover-wrap {
    position: relative;
    display: inline-block;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 0.45s ease;
    transform-origin: center bottom;
    transform-style: preserve-3d;
}

.binge-card:hover .binge-cover-wrap {
    transform: translateY(-12px) rotate(-1.5deg);
    filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.7));
}

.binge-cover {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 3px;
    background: #111;
}

/* Sheen overlay on hover */

.binge-cover-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 3px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.binge-card:hover .binge-cover-wrap::after {
    opacity: 1;
}

/* Type pill — Film / TV — sits above the cover */

.binge-type-pill {
    display: inline-flex;
    align-self: flex-start;
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pill-color, rgba(255, 255, 255, 0.3));
    border: 1px solid var(--pill-color, rgba(255, 255, 255, 0.1));
    padding: 3px 7px;
    border-radius: 2px;
}

/* Progress bar — TV in progress */

.binge-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.binge-progress-bar {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    border-radius: 1px;
}

.binge-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1px;
    transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.binge-progress-label {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

/* Episode indicator — e.g. S2 E4 */

.binge-episode {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}

/* Completed date */

.binge-date {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}

/* Small stars */

.binge-rating-small {
    display: flex;
    gap: 2px;
}

.binge-rating-small span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

/* Rewatch indicator */

.binge-rewatch {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
}

/* Card title */

.binge-card-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.35;
    letter-spacing: 0.01em;
}

/* Loading & empty */

.binge-loading,
.binge-empty {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
}

/* View toggle */

.view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.view-toggle-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.25);
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
    font-size: 10px;
}

.view-toggle-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.view-toggle-btn.active {
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Section spacing */

.binge-section {
    padding-bottom: 120px;
}

/* ── MODAL ── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    font-family: 'Geist Mono', monospace;
    transition: color 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    color: white;
}

.modal-inner {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-cover-wrap {
    flex-shrink: 0;
}

.modal-cover {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.6);
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
}

.modal-tag {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
}

.modal-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.modal-subtitle {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 16px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.modal-stars {
    display: flex;
    gap: 3px;
}

.modal-stars span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.25);
}

.modal-stars[data-rating="1"] span:nth-child(-n+1),
.modal-stars[data-rating="2"] span:nth-child(-n+2),
.modal-stars[data-rating="3"] span:nth-child(-n+3),
.modal-stars[data-rating="4"] span:nth-child(-n+4),
.modal-stars[data-rating="5"] span:nth-child(-n+5) {
    color: rgba(255, 255, 255, 0.8);
}

.modal-date {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
}

.modal-review {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    letter-spacing: 0.01em;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
    margin-top: 4px;
}

/* ── ANIMATIONS ── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── RESPONSIVE ── */

@media screen and (max-width: 768px) {
    .binge-hero {
        padding: 60px 24px 30px;
    }

    .binge-hero .container,
    .binge-title {
        text-align: center;
    }

    .binge-section .container {
        padding: 0 16px;
    }

    .binge-filters {
        justify-content: center;
    }

    .binge-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 32px 20px;
    }

    .binge-card:hover .binge-cover-wrap {
        transform: translateY(-8px) rotate(-1deg);
    }

    .modal-inner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 32px 24px;
    }

    .modal-cover-wrap {
        max-width: 140px;
        margin: 0 auto;
    }

    .modal-content {
        text-align: center;
    }

    .modal-stars {
        justify-content: center;
    }

    .modal-review {
        text-align: left;
    }

    header {
        justify-content: center;
    }
}

@media (hover: none) {
    .binge-card:hover .binge-cover-wrap {
        transform: none;
        filter: none;
    }
}
