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

body {
    font-family: 'Oswald', sans-serif;
    background: #0d0d0d;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 30px;
}

/* ── Header ──────────────────────────────────── */
.sta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
}
.sta-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.12em;
    color: #fff;
}
.sta-nav { display: flex; gap: 10px; }

/* ── TTS controls ────────────────────────────── */
.sta-tts {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sta-tts-btn {
    border: none;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sta-tts-btn:hover { transform: scale(1.12); }
.tts-play  { background: #22c55e; color: #fff; }
.tts-pause { background: #f59e0b; color: #fff; }
.tts-stop  { background: #ef4444; color: #fff; }
.tts-speed { background: #444; color: #fff; font-weight: bold; }
.sta-tts-speed {
    min-width: 32px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

.sta-nav-btn {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.15s;
}
.sta-nav-back    { background: #222; color: #aaa; border: 1px solid #444; }
.sta-nav-back:hover { color: #fff; border-color: #888; }
.sta-nav-menu    { background: linear-gradient(135deg, #FFD700, #FFA500); color: #111; }
.sta-nav-menu:hover { transform: scale(1.05); }
.sta-nav-shuffle { background: linear-gradient(135deg, #00c8ff, #0066cc); color: #fff; }
.sta-nav-shuffle:hover { transform: scale(1.05); }
.sta-export-btn  { background: linear-gradient(135deg, #a855f7, #6d28d9); color: #fff; }
.sta-export-btn:hover { transform: scale(1.05); }

/* ── Participants strip (top) ─────────────────── */
.sta-strip {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    margin-bottom: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sta-strip::-webkit-scrollbar { display: none; }

/* Wrapper: card + estrella debajo del card (debajo del borde de color) */
.sta-card-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.sta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    padding: 6px 5px 7px;
    border-radius: 10px;
    border: 3px solid #333;
    background: #141414;
    transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    min-width: 90px;
}
.sta-card:hover { transform: scale(1.08); }
.sta-card.selected-card {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Status borders */
.sta-card.st-active    { border-color: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,0.45); }
.sta-card.st-nominated { border-color: #f59e0b; box-shadow: 0 0 12px rgba(245,158,11,0.5); }
.sta-card.st-used      { border-color: #FFD700; box-shadow: 0 0 10px rgba(255,215,0,0.35); }
.sta-card.st-eliminated {
    border-color: #cc0000;
    box-shadow: 0 0 10px rgba(200,0,0,0.4);
    filter: grayscale(70%) brightness(0.5);
}

.sta-card img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 6px;
    pointer-events: none;
    flex-shrink: 0;
}

/* Estrella debajo del card (debajo del borde que cambia de color) */
.sta-new-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    pointer-events: none;
}
.sta-new-star {
    width: 24px;
    height: 24px;
    background: linear-gradient(145deg, #ffeb3b 0%, #ffc107 35%, #ffa000 100%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.35);
    flex-shrink: 0;
}

/* Assignment count badge */
.sta-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #FFD700;
    color: #000;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    z-index: 2;
}

.sta-card-name {
    font-size: calc(0.78rem + 5px);
    font-weight: 600;
    color: #ccc;
    margin-top: 5px;
    text-align: center;
    white-space: nowrap;
}
.sta-card.st-active    .sta-card-name { color: #22c55e; }
.sta-card.st-nominated .sta-card-name { color: #f59e0b; }
.sta-card.st-used      .sta-card-name { color: #FFD700; }
.sta-card.st-eliminated .sta-card-name { color: #cc0000; }

/* Context menu current-status dot */
.ctx-dot {
    display: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 6px;
}
.ctx-dot-active    { background: #22c55e; box-shadow: 0 0 5px #22c55e; }
.ctx-dot-nominated { background: #FFD700; box-shadow: 0 0 5px #FFD700; }
.ctx-dot-eliminated { background: #cc0000; box-shadow: 0 0 5px #cc0000; }

/* ── Detail panel (bottom) ────────────────────── */
.sta-detail {
    flex: 1;
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 20px 24px;
    overflow-y: auto;
    min-height: 200px;
}

.sta-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #444;
    font-size: 1.1rem;
    font-style: italic;
    min-height: 160px;
}

/* Detail header */
.sta-detail-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2a2a;
}
.sta-detail-header img {
    width: 90px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #444;
    flex-shrink: 0;
}
.sta-detail-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.08em;
    color: #FFD700;
}
.sta-detail-status {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}
.sta-detail-count {
    font-size: 0.9rem;
    color: #888;
    margin-top: 6px;
}

/* ── Scene images row ─────────────────────────── */
.sta-scene-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin: 0 0 12px 0;
    width: 100%;
    overflow: visible;
    padding: 60px 4px;
}
.sta-scene-row:empty { display: none; }
.sta-scene-row img {
    width: 100%;
    height: 130px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #555;
    display: block;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s ease, outline 0.2s;
    cursor: pointer;
    transform-origin: center center;
}
.sta-scene-row img:hover {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Text blocks */
.sta-detail-texts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sta-text-block {
    background: #181818;
    border-left: 3px solid #555;
    border-radius: 6px;
    padding: 12px 16px;
}
.sta-text-block.past-secrets { border-color: #aa44ff; }
.sta-text-block.problems     { border-color: #ff3030; }
.sta-text-block.stories      { border-color: #00aaff; }
.sta-text-block.secrets      { border-color: #22c55e; }
.sta-text-block.housemate    { border-color: #FFD700; }
.sta-text-block.housemate .sta-text-cat { color: #FFD700; }
.sta-text-block.housemate .sta-blk-play.blk-playing { background: #FFD700; }

.sta-text-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #555;
    margin-bottom: 4px;
}


.sta-blk-tts {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}
.sta-text-block:hover .sta-blk-tts { opacity: 1; }
.sta-blk-btn {
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.sta-blk-btn:hover { transform: scale(1.18); background: rgba(255,255,255,0.25); }
.sta-blk-play.blk-playing { background: #22c55e; }
.sta-text-block.past-secrets .sta-blk-play.blk-playing { background: #aa44ff; }
.sta-text-block.problems     .sta-blk-play.blk-playing { background: #ff3030; }
.sta-text-block.stories      .sta-blk-play.blk-playing { background: #00aaff; }
.sta-text-block.secrets      .sta-blk-play.blk-playing { background: #22c55e; }
.sta-text-block.past-secrets .sta-text-cat { color: #aa44ff; }
.sta-text-block.problems     .sta-text-cat { color: #ff5555; }
.sta-text-block.stories      .sta-text-cat { color: #00aaff; }
.sta-text-block.secrets      .sta-text-cat { color: #22c55e; }

.sta-text-title {
    font-size: clamp(2rem, 3.6vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.sta-text-body {
    font-size: clamp(2rem, 3.6vw, 2.4rem);
    color: #bbb;
    line-height: 1.65;
}
.sta-pdf-btn {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}
.sta-pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.6);
}

.sta-no-texts {
    text-align: center;
    color: #555;
    font-size: 1rem;
    padding: 20px 0;
    font-style: italic;
}

/* ── Context menu ─────────────────────────────── */
.sta-ctx-menu {
    position: fixed;
    background: #1e1e1e;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 4px 0;
    display: none;
    z-index: 3000;
    min-width: 165px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}
.sta-ctx-menu.active { display: block; }
.sta-ctx-label {
    font-size: 0.7rem;
    color: #555;
    padding: 6px 14px 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: default;
    border-bottom: 1px solid #333;
    margin-bottom: 2px;
}
.sta-ctx-menu div:not(.sta-ctx-label) {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 1rem;
    color: #ddd;
    transition: background 0.15s;
}
.sta-ctx-menu div:not(.sta-ctx-label):hover { background: #333; color: #fff; }

/* ── Hover image preview ────────────────────── */
.sta-img-preview {
    display: none;
    position: fixed;
    z-index: 9999;
    height: 50vh;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.85);
    pointer-events: none;
    border: 2px solid rgba(255,255,255,0.15);
}
.sta-img-preview.active { display: block; }
