/* ─── HORROR ROADMAP THEME ─── */
:root {
    --re-red: #c0392b;
    --re-red-dim: #7a1f16;
    --re-red-glow: rgba(192, 57, 43, 0.25);
    --sh-teal: #2a9d8f;
    --sh-teal-dim: #1a6b62;
    --sh-teal-glow: rgba(42, 157, 143, 0.25);
    --done-gold: #f4a261;
    --done-gold-glow: rgba(244, 162, 97, 0.2);
    --skip-grey: #444;
    --upcoming: #7c5cbf;
    --upcoming-glow: rgba(124, 92, 191, 0.2);
    --downloading: #3a86ff;
    --couch: #e9c46a;
    --bg: #080808;
    --surface: #0f0f0f;
    --surface2: #141414;
    --border: #1e1e1e;
    --text: #e0e0e0;
    --text-dim: #666;
    --text-mid: #999;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Share Tech Mono', monospace;
    min-height: 100vh;
}

/* Scanline effect */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
    pointer-events: none;
    z-index: 100;
}

.horror-app {
    max-width: 1060px;
    margin: 0 auto;
    padding: 64px 24px 80px;
    position: relative;
    z-index: 1;
}

/* ─── HEADER ─── */
.horror-header {
    text-align: center;
    animation: fadeDown 0.8s ease both;
}

.horror-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(56px, 9vw, 108px);
    letter-spacing: 8px;
    line-height: 0.88;
    background: linear-gradient(130deg, #c0392b 0%, #e8c9b8 45%, #2a9d8f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-sub {
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    letter-spacing: 2px;
}

.header-line {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}
.header-line::before, .header-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border));
}
.header-line::after {
    background: linear-gradient(90deg, var(--border), transparent);
}
.header-line span {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 3px;
    white-space: nowrap;
}

/* ─── SECTION HEADERS ─── */
.section-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 11px;
    letter-spacing: 4px;
    padding: 5px 14px;
    border-radius: 2px;
    text-transform: uppercase;
}
.section-badge.re {
    background: var(--re-red-dim);
    color: #ff8a7a;
    box-shadow: 0 0 16px var(--re-red-glow);
    border: 1px solid var(--re-red);
}
.section-badge.sh {
    background: var(--sh-teal-dim);
    color: #6ee7df;
    box-shadow: 0 0 16px var(--sh-teal-glow);
    border: 1px solid var(--sh-teal);
}

.section-title-re { color: #e05a4a !important; }
.section-title-sh { color: #4cc8be !important; }

.section-divider { height: 1px; }
.section-divider.re { background: linear-gradient(90deg, var(--re-red-dim), transparent); }
.section-divider.sh { background: linear-gradient(90deg, var(--sh-teal-dim), transparent); }

.gradient-title {
    background: linear-gradient(90deg, #c0392b, #e8c9b8, #2a9d8f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── NOW PLAYING BAR ─── */
.now-playing-bar {
    background: linear-gradient(90deg, rgba(58,134,255,0.08), rgba(58,134,255,0.03));
    border: 1px solid rgba(58,134,255,0.2);
    border-left: 3px solid #3a86ff;
    animation: fadeDown 0.6s ease 0.2s both;
}
.now-playing-dot {
    width: 8px;
    height: 8px;
    background: #3a86ff;
    animation: pulse-blue 1.5s ease-in-out infinite;
}
.now-playing-text {
    color: #3a86ff;
    letter-spacing: 3px;
}
.now-playing-game {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 3px;
}
.now-playing-note {
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    font-size: 12px;
    color: var(--text-dim);
}

/* ─── GAME TABLE ─── */
.game-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 1.2;
}
.game-note {
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 3px;
}
.game-note.hot { color: #e9c46a; }
.game-note.active { color: #3a86ff; }
.protagonist { color: var(--text-mid); font-size: 12px; }

/* Order badge */
.order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid var(--border);
    color: var(--text-dim);
}
.order-badge.active-now {
    border-color: #3a86ff;
    color: #3a86ff;
    box-shadow: 0 0 10px rgba(58,134,255,0.4);
    animation: pulse-blue 2s ease-in-out infinite;
}


/* Row variants */
.row-done { background: rgba(244, 162, 97, 0.04); }
.row-tonight { background: rgba(58, 134, 255, 0.04); }
.row-skip { opacity: 0.45; }
.mud-table-body tr:has(.row-now-playing) { background: rgba(58, 134, 255, 0.06); box-shadow: inset 0 0 20px rgba(58, 134, 255, 0.08), 0 0 12px rgba(58, 134, 255, 0.1); animation: glow-playing 3s ease-in-out infinite; }
.mud-table-body tr:has(.row-now-playing) .row-now-playing { background: transparent !important; }
@keyframes glow-playing { 0%, 100% { box-shadow: inset 0 0 20px rgba(58,134,255,0.08), 0 0 8px rgba(58,134,255,0.08); } 50% { box-shadow: inset 0 0 24px rgba(58,134,255,0.14), 0 0 16px rgba(58,134,255,0.15); } }
.order-badge.completed {
    border-color: var(--done-gold);
    color: var(--done-gold);
    background: rgba(244, 162, 97, 0.15);
    box-shadow: 0 0 10px rgba(244, 162, 97, 0.4);
}
.order-badge.now-playing {
    border-color: #3a86ff;
    color: #3a86ff;
    background: rgba(58, 134, 255, 0.15);
    box-shadow: 0 0 12px rgba(58, 134, 255, 0.5);
    animation: pulse-blue 2s ease-in-out infinite;
}
.order-badge.next-up {
    border-color: #b4b4b4;
    color: #b4b4b4;
    box-shadow: 0 0 10px rgba(180, 180, 180, 0.3);
}
.mud-table-body tr:has(.row-next-up) { background: rgba(180, 180, 180, 0.04); box-shadow: inset 0 0 16px rgba(180, 180, 180, 0.06), 0 0 8px rgba(180, 180, 180, 0.06); animation: glow-next 3s ease-in-out infinite; }
.mud-table-body tr:has(.row-next-up) .row-next-up { background: transparent !important; }
@keyframes pulse-next { 0%, 100% { box-shadow: 0 0 6px rgba(180,180,180,0.3); } 50% { box-shadow: 0 0 14px rgba(180,180,180,0.6); } }
@keyframes glow-next { 0%, 100% { box-shadow: inset 0 0 16px rgba(86,212,192,0.06), 0 0 6px rgba(86,212,192,0.06); } 50% { box-shadow: inset 0 0 20px rgba(86,212,192,0.1), 0 0 12px rgba(86,212,192,0.1); } }

/* Status stripe — first cell only */
.stripe-done { border-left: 3px solid var(--done-gold) !important; }
.stripe-essential-re { border-left: 3px solid var(--re-red) !important; }
.stripe-essential-sh { border-left: 3px solid var(--sh-teal) !important; }
.stripe-skip { border-left: 3px solid var(--skip-grey) !important; }
.stripe-upcoming { border-left: 3px solid var(--upcoming) !important; }
.stripe-recommended { border-left: 3px solid #888 !important; }
.stripe-downloading { border-left: 3px solid var(--downloading) !important; }

/* Movie rows */
.movie-row { opacity: 0.6; transition: opacity 0.2s, background 0.2s; }
.movie-row:hover { opacity: 1; background: #111; }
.movie-row .game-name { font-family: 'Share Tech Mono', monospace; font-size: 12px; color: #b8976a; letter-spacing: 1px; }
.movie-row .game-note { font-size: 11px; color: #4d4d4d; }
.movie-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: 13px; opacity: 0.65; }

/* Stars & length */
.star-filled { color: #c4a97d; }
.star-empty { color: #2a2a2a; }
.length-col { white-space: nowrap; text-align: center; min-width: 70px; }
.length-label { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }

/* Platform */
.platform-you { color: #aed6a3; }
.platform-friend { color: #a0c4ff; }
.platform-buy { color: #f4a261; }
.platform-dead { color: #555; text-decoration: line-through; }
.couch-tag {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 1px;
    padding: 2px 6px;
    background: rgba(233,196,106,0.1);
    border: 1px solid rgba(233,196,106,0.3);
    color: var(--couch);
    border-radius: 2px;
    margin-top: 4px;
}

/* ─── CALENDAR ─── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-labels > div { text-align: center; font-size: 11px; letter-spacing: 2px; color: var(--text-dim); padding: 4px 0 8px; text-transform: uppercase; }
.cal-day {
    min-height: 72px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.cal-day:hover { background: var(--surface2); border-color: #333; }
.cal-day.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-day.today { border-color: #c0392b; }
.cal-day.today .cal-day-num { color: #e05a4a; }
.cal-day.weekend .cal-day-num { color: #e5a00d; }
.cal-day-num { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.cal-session-dot {
    font-size: 10px;
    margin-top: 2px;
    padding: 2px 4px;
    border-radius: 2px;
    line-height: 1.3;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-session-dot.loc-brecht { background: rgba(192,57,43,0.2); color: #e05a4a; border-left: 2px solid #c0392b; }
.cal-session-dot.loc-pieter { background: rgba(42,157,143,0.2); color: #4cc8be; border-left: 2px solid #2a9d8f; }
.cal-session-dot.loc-unknown { background: rgba(150,150,150,0.1); color: #888; border-left: 2px solid #555; }

/* ─── UPCOMING LIST ─── */
.upcoming-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 6px;
    transition: background 0.15s;
}
.upcoming-item:hover { background: var(--surface2); }
.upcoming-loc { font-size: 11px; padding: 2px 8px; border-radius: 2px; letter-spacing: 1px; }
.upcoming-loc.loc-brecht { background: rgba(192,57,43,0.15); color: #e05a4a; }
.upcoming-loc.loc-pieter { background: rgba(42,157,143,0.15); color: #4cc8be; }

/* ─── LEGEND ─── */
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ─── ANIMATIONS ─── */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-blue { 0%, 100% { box-shadow: 0 0 6px rgba(58,134,255,0.4); } 50% { box-shadow: 0 0 14px rgba(58,134,255,0.8); } }
@keyframes pulse-gold { 0%, 100% { box-shadow: 0 0 6px rgba(244,162,97,0.3); } 50% { box-shadow: 0 0 14px rgba(244,162,97,0.7); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ─── LOGIN ─── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}
.login-card {
    max-width: 380px;
    width: 100%;
    padding: 48px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.login-title {
    font-size: 48px;
    text-align: center;
    margin-bottom: 8px;
}
.plex-button {
    background: #e5a00d !important;
    color: #000 !important;
    font-weight: bold;
    letter-spacing: 2px;
}

/* ─── MudBlazor overrides ─── */
.mud-table-root { background: transparent !important; }
.mud-table-head .mud-table-cell {
    font-size: 9px !important;
    letter-spacing: 4px !important;
    color: var(--text-dim) !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid var(--border) !important;
    background: transparent !important;
}
.mud-table-body .mud-table-cell {
    border-bottom: 1px solid var(--border) !important;
    background: transparent !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.mud-dialog { background: #0f0f0f !important; border: 1px solid #2a2a2a !important; }

/* ─── RESPONSIVE ─── */
@media (max-width: 700px) { .horror-app { padding: 32px 12px 60px; } }

/* Blazor error boundary */
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }
