:root {
    --bg-deep: #01020a;
    --bg-mid: #060b2e;
    --bg-panel: #0a1550;
    --bg-panel-light: #132074;
    --blue-glow: #2f5cff;
    --gold: #ffd45e;
    --gold-dim: #7a6a37;
    --gold-bright: #fff2c2;
    --green: #3ddc72;
    --red: #ff4d4d;
    --text: #eef1ff;
    --text-dim: #9aa3d6;
    --font-display: 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg-deep);
    color: var(--text);
    font-family: var(--font-display);
}

body {
    background:
        radial-gradient(ellipse 60% 50% at 50% 18%, rgba(47, 92, 255, 0.35), transparent 60%),
        radial-gradient(ellipse 90% 60% at 50% 100%, rgba(10, 21, 80, 0.9), transparent 70%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 55%, var(--bg-deep) 100%);
    min-height: 100vh;
}

a {
    color: var(--gold);
}

button {
    font-family: inherit;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.gold-text {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(255, 212, 94, 0.5);
}

.panel {
    background: linear-gradient(180deg, var(--bg-panel-light), var(--bg-panel));
    border: 1px solid rgba(255, 212, 94, 0.25);
    border-radius: 14px;
    box-shadow: 0 0 30px rgba(47, 92, 255, 0.25), inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- Lifeline icon badges (shared between player + director) ---- */
.lifeline-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 64px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 1px solid var(--gold-dim);
    background: rgba(255, 255, 255, 0.03);
    transition: opacity 0.2s, filter 0.2s;
}

.lifeline-badge svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.6;
}

.lifeline-badge .label {
    font-size: 10px;
    text-align: center;
    color: var(--text-dim);
    line-height: 1.1;
}

.lifeline-badge.used {
    opacity: 0.35;
    filter: grayscale(1);
}

/* ---- Prize ladder (shared shape between player + director) ---- */
.ladder {
    display: flex;
    flex-direction: column-reverse;
    gap: 3px;
}

.ladder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-dim);
    border: 1px solid transparent;
}

.ladder-row .lvl {
    opacity: 0.6;
    width: 1.6em;
}

.ladder-row.safe-haven {
    border-color: var(--gold-dim);
}

.ladder-row.won {
    background: rgba(61, 220, 114, 0.12);
    border-color: rgba(61, 220, 114, 0.35);
    color: var(--green);
}

.ladder-row.current {
    background: rgba(255, 212, 94, 0.15);
    border-color: var(--gold);
    color: var(--gold-bright);
    font-weight: bold;
}

.ladder-row.lost {
    background: rgba(255, 77, 77, 0.15);
    border-color: var(--red);
    color: var(--red);
}

/* ---- Recap/outcome list (shared shape with .ladder-row) ---- */
.outcome-list {
    display: flex;
    flex-direction: column-reverse;
    gap: 3px;
    width: 100%;
    max-width: 420px;
}

.outcome-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid transparent;
}

.outcome-list-row .lvl {
    opacity: 0.6;
    width: 1.6em;
}

.outcome-list-row.won {
    background: rgba(61, 220, 114, 0.12);
    border-color: rgba(61, 220, 114, 0.35);
    color: var(--green);
}

.outcome-list-row.lost {
    background: rgba(255, 77, 77, 0.15);
    border-color: var(--red);
    color: var(--red);
}

/* ---- Ask The Audience results bar chart (shared by player + director) ---- */
.audience-results {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--gold-dim);
    width: 100%;
}

.audience-results h2 {
    font-size: 13px;
    margin: 0 0 10px;
    text-align: left;
}

.audience-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.audience-bar-row .answer-key {
    color: var(--gold);
    font-weight: bold;
    width: 1.2em;
}

.audience-bar-track {
    flex: 1;
    height: 14px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.audience-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-glow), var(--gold));
    transition: width 0.6s ease;
}

.audience-bar-pct {
    width: 80px;
    text-align: right;
    color: var(--text-dim);
}

/* ---- Phone-A-Friend 30s call timer (shared by player + director) ---- */
.phone-a-friend-timer {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(1, 2, 10, 0.85);
    border: 2px solid var(--gold);
    border-radius: 50%;
    font-size: 44px;
    font-weight: bold;
    color: var(--gold);
    box-shadow: 0 0 30px rgba(255, 212, 94, 0.5);
}
