/* ============================================================
   SpoiLock — assets/css/pages/episode.css
   Cartella: /assets/css/pages/
   Stanza dell'episodio e Spoiler Shield.
   Progettata prima per lo smartphone (colonna unica, pulsanti grandi).
   ============================================================ */

.st-room { --st-room-max: 760px; }
.st-room .container { max-width: var(--st-room-max); }

/* ---------- Intestazione ---------- */
.st-room-hero {
    position: relative;
    padding-bottom: 1rem;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--st-line);
}
.st-room-backdrop {
    position: absolute;
    inset: -40px;
    z-index: -1;
    background-size: cover;
    background-position: center 30%;
    filter: blur(26px) saturate(125%);
    opacity: .4;
    transform: scale(1.1);
}
.st-room-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 10, 11, .2), rgba(10, 10, 11, .85) 70%, var(--st-ink));
}

.st-room-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .5rem;
}
.st-room-back {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: 44px;
    max-width: 75%;
    color: var(--st-text);
    font-weight: 600;
    text-decoration: none;
}
.st-room-back span:not(.visually-hidden) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-room-back:hover { color: #fff; }
.st-room-share { background: rgba(20, 20, 22, .7); }

.st-room-heading { padding-top: 1rem; }
.st-room-code { font-size: 1rem; padding: .3em .7em; margin-bottom: .75rem; }
.st-room-title {
    margin: 0 0 .6rem;
    font-size: clamp(1.7rem, 1.3rem + 2.2vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.08;
}
.st-room-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin: 0;
    color: var(--st-muted);
    font-size: .85rem;
}
.st-room-meta .bi { margin-right: .2rem; }

/* Precedente / successivo */
.st-room-nav {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding-top: 1.1rem;
}
.st-room-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: .35rem .9rem .35rem .6rem;
    border: 1px solid var(--st-line);
    border-radius: var(--st-radius);
    background: rgba(20, 20, 22, .7);
    color: var(--st-text);
    font-family: var(--st-font-display);
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
}
.st-room-nav-btn--next { padding: .35rem .6rem .35rem .9rem; margin-left: auto; text-align: right; }
.st-room-nav-btn small { display: block; color: var(--st-muted); font-family: var(--st-font-body); font-size: .7rem; font-weight: 600; line-height: 1.1; }
.st-room-nav-btn:hover { color: #fff; border-color: var(--st-accent); }

/* ---------- Corpo ---------- */
.st-room-body { padding-top: 1.25rem; padding-bottom: 2rem; }

/* ---------- Spoiler Shield ---------- */
.st-shield {
    position: relative;
    margin-bottom: 1.25rem;
    padding: 1.4rem 1.25rem;
    border: 1px solid rgba(242, 181, 68, .45);
    border-radius: var(--st-radius-lg);
    background:
        repeating-linear-gradient(-45deg, rgba(242, 181, 68, .05) 0 12px, transparent 12px 24px),
        var(--st-surface);
    text-align: center;
}
.st-shield-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .9rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: rgba(242, 181, 68, .14);
    color: var(--st-spoiler);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.st-shield-title { font-size: 1.3rem; margin-bottom: .5rem; }
.st-shield-text { max-width: 40ch; margin: 0 auto 1.1rem; color: var(--st-muted); font-size: .92rem; }
.st-shield-previous {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 auto 1rem;
    padding-left: 0;
    text-align: left;
    font-size: .9rem;
}
.st-shield-previous .form-check-input { float: none; margin: 0; flex-shrink: 0; width: 1.2em; height: 1.2em; }
.st-shield-btn { width: 100%; max-width: 360px; min-height: 52px; font-size: 1.05rem; }
.st-shield-actions { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.st-shield-actions .btn { width: 100%; max-width: 360px; }

.st-shield--upcoming { border-color: rgba(218, 9, 21, .45); background: var(--st-surface); }
.st-shield--upcoming .st-shield-badge { background: rgba(218, 9, 21, .14); color: var(--st-accent-hi); }

.st-room-countdown {
    display: flex;
    justify-content: center;
    gap: .5rem;
}
.st-room-countdown .st-cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: .6rem .4rem;
    border-radius: var(--st-radius);
    background: var(--st-raised);
}
.st-cd-unit strong { font-family: var(--st-font-display); font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.st-cd-unit span { color: var(--st-muted); font-size: .72rem; font-weight: 600; margin-top: .25rem; }

/* Conferma "hai visto" */
.st-watched-bar {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.25rem;
    padding: .7rem 1rem;
    border: 1px solid rgba(218, 9, 21, .35);
    border-radius: var(--st-radius);
    background: rgba(218, 9, 21, .08);
    font-size: .9rem;
    font-weight: 600;
}
.st-watched-bar .bi { color: var(--st-accent); font-size: 1.1rem; }
.st-watched-undo {
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: .25rem 0;
    border: 0;
    background: none;
    color: var(--st-muted);
    font-size: .82rem;
    text-decoration: underline;
    text-underline-offset: .2em;
}
.st-watched-undo:hover { color: var(--st-text); }

/* ---------- Contenuto coperto / scoperto ---------- */
.st-room-content { transition: filter .5s ease, opacity .5s ease; }
.st-room-content.is-locked {
    filter: blur(10px);
    opacity: .55;
    user-select: none;
    pointer-events: none;
}

.st-room-section { margin-bottom: 1.75rem; }
.st-room-section-title { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; margin-bottom: .7rem; }
.st-room-count { padding: 0 .45rem; border-radius: 999px; background: var(--st-raised); font-size: .75rem; line-height: 1.6; }
.st-room-overview { color: #D4D4D8; line-height: 1.65; margin: 0; }
.st-room-section .st-empty { padding: 2rem 1rem; border: 1px dashed var(--st-line); border-radius: var(--st-radius); }
.st-room-section .st-empty .st-ico { display: block; margin: 0 auto .8rem; }

/* Intestazione della sezione discussioni */
.st-room-section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; }
.st-room-section-head .st-room-section-title { margin: 0; }
.st-room-section-head .btn { flex-shrink: 0; }
