/* ============================================
   GLOBAL RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: "Inter", sans-serif;
    background: #fff;
    color: #000;
}


/* ============================================
   PRESENTATION SCREEN
   Fullscreen display shown to the audience.
   Dark theme matching the original reveal.js
   design: #1b1a1a bg, Inter font, card-based.
   ============================================ */

/* --- Main Screen Container --- */
.screen {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 4%;
    background-color: #1b1a1a;
    color: #ffffff;
    overflow: hidden;
}

/* --- Game Title (persistent header) --- */
.screen > .title {
    flex-shrink: 0;
}

.screen > .title h1 {
    font-weight: 600;
    font-size: 1.2em;
    color: #ffffff;
    text-align: left;
    overflow-wrap: break-word;
}

/* --- Content Area (HTMX-swapped) --- */
.screen > #content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* ============================================
   WAITING STATE
   Centered large text, like the original
   "welcome" slide with 800-weight type.
   ============================================ */
.waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.waiting h2 {
    font-weight: 800;
    color: #ffffff;
    font-size: 8vw;
    line-height: 1.1;
    overflow-wrap: break-word;
}

.waiting p {
    font-weight: 400;
    font-size: 1.5vw;
    color: #ffffff;
    opacity: 0.6;
    margin-top: 2vh;
}

.waiting .timestamp {
    margin-top: 4vh;
    font-size: 1vw;
    opacity: 0.25;
    font-variant-numeric: tabular-nums;
}


/* ============================================
   SHOW OPENER SCREEN
   ============================================ */
.show-opener {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 5vw;
}

.show-opener-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 100%;
    justify-content: center;
}

.show-opener-layout {
    display: flex;
    align-items: center;
    gap: 3vw;
}

.show-opener-qr {
    flex-shrink: 0;
    width: 16vw;
}

.show-opener-qr img {
    display: block;
    width: 100%;
    height: auto;
}

.show-opener-text {
    display: flex;
    flex-direction: column;
    gap: 1vw;
    flex: 1;
}

.show-opener-title {
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-align: left;
    margin: 0;
    white-space: nowrap;
}

.show-opener-title-line-1 {
    font-size: 8vw;
}

.show-opener-title-line-2 {
    font-size: 5.8vw;
}

.show-opener-url {
    font-size: 1.4vw;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-family: 'Courier New', monospace;
    text-align: left;
}


/* ============================================
   GAME OVER SCREEN
   ============================================ */
.game-over {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.game-over-content {
    max-width: 80%;
}

.game-over-title {
    font-size: 10vw;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 3vh;
}

.game-over-message {
    font-size: 2.5vw;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 1.5vh;
}

.game-over-farewell {
    font-size: 2vw;
    font-weight: 500;
    color: #ffffff;
    opacity: 0.7;
    margin-bottom: 5vh;
}

.game-over-decoration {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 4vh;
}

.game-over-decoration .star {
    font-size: 3vw;
    animation: twinkle 2s ease-in-out infinite;
}

.game-over-decoration .star:nth-child(1) { animation-delay: 0s; }
.game-over-decoration .star:nth-child(2) { animation-delay: 0.3s; }
.game-over-decoration .star:nth-child(3) { animation-delay: 0.6s; }

@keyframes twinkle {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}


/* ============================================
   ROUND INTRO
   Supertitle + player cards in a row,
   matching the original scoreboard layout.
   ============================================ */
.round-intro {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.round-intro .supertitle {
    font-weight: 600;
    font-size: 1.2em;
    color: #ffffff;
    text-align: left;
    flex-shrink: 0;
}

.round-intro .round-name {
    font-weight: 800;
    color: #ffffff;
    font-size: 8vw;
    line-height: 1.1;
    flex-grow: 0;
    margin-top: 2vh;
    text-align: left;
}

.round-intro .players-row {
    display: flex;
    gap: 40px;
    align-self: stretch;
    flex-grow: 1;
    align-items: center;
    margin-top: 4vh;
}

.round-intro .player-card {
    flex: 1 1 0;
    padding: 40px;
    background: #2D2D2D;
    border-radius: 10px;
    border: 1px solid #3F3D3D;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.round-intro .player-card .player-order {
    font-size: 2vw;
    font-weight: 300;
    color: #ffffff;
    opacity: 0.5;
}

.round-intro .player-card .player-name {
    font-size: 3vw;
    font-weight: 700;
    color: #ffffff;
}


/* ============================================
   PRESENTATION PHASE LAYOUT
   Title row + player/timer row + prompt + progress bar
   ============================================ */
.presentation-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2vh;
    overflow: hidden;
}

.presentation-title-row {
    flex-shrink: 0;
    text-align: center;
}

.presentation-title-row h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
}

.presentation-player-row h3 {
    font-size: 2vw;
    font-weight: 400;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-align: center;
}

.presentation-prompt-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

.presentation-prompt-row p {
    font-size: 6vw;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    text-align: center;
    width: 100%;
}

/* ============================================
   SHARED PHASE TOP ROW COMPONENT
   Used by both debate and selection phases
   ============================================ */
.phase-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4vw;
    align-items: center;
    flex-shrink: 0;
}

.phase-round-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1vh;
}

.phase-round-number {
    font-size: 8vw;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.phase-label {
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.5;
}

.phase-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.phase-time {
    font-size: 8vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.phase-time.urgent {
    color: #ff4444;
    animation: pulse-urgent 1s infinite;
}

.phase-seconds {
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
}

.phase-waiting,
.phase-complete {
    font-size: 1.5vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

.phase-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.phase-qr img {
    width: 12vw;
    height: auto;
}

.phase-qr-url {
    font-size: 1vw;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
}

/* ============================================
   DEBATE PHASE LAYOUT
   Title row + horizontal bar chart showing vote percentages
   ============================================ */
.debate-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2vh;
    overflow: hidden;
}

.debate-title-row {
    flex-shrink: 0;
    text-align: center;
}

.debate-title-row h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
}

.debate-votes-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2vh;
    min-height: 0;
}

.debate-bar-chart {
    display: flex;
    width: 100%;
    height: 12vh;
    border-radius: 2vh;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.debate-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.8s ease;
    position: relative;
    min-width: 10%;
}

.debate-bar-segment--preview {
    opacity: 0.3;
}

.debate-bar-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5vh;
    padding: 1vh;
}

.debate-bar-name {
    font-size: 1.5vw;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.debate-vote-total {
    font-size: 1.5vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   SELECTION PHASE LAYOUT
   Title row + custom three-row layout for selection phase
   ============================================ */
.selection-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 3vh;
    overflow: hidden;
}

.selection-title-row {
    flex-shrink: 0;
    text-align: center;
}

.selection-title-row h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
}

.selection-round-row {
    flex-shrink: 0;
}

.selection-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4vw;
    align-items: center;
    flex-shrink: 0;
}

.selection-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.selection-title h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
    margin: 0;
}

.selection-round-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1vh;
}

.selection-round-label {
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.5;
}

.selection-label {
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.5;
}

.selection-round-title {
    font-size: 1.5vw;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
}

.selection-round-number {
    font-size: 8vw;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.selection-player-name {
    font-size: 2vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.8;
    margin-top: 1vh;
}

.selection-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.selection-qr img {
    width: 12vw;
    height: auto;
}

.selection-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.selection-time {
    font-size: 8vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.selection-time.urgent {
    color: #ff4444;
    animation: pulse-urgent 1s infinite;
}

.selection-seconds {
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
}

.selection-bar {
    width: 100%;
    height: 6px;
    background: #3F3D3D;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1vh;
}

.selection-bar-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    transition: width 1s linear;
}

.selection-complete,
.selection-waiting {
    font-size: 1.5vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

.selection-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
    flex-shrink: 0;
    padding: 3vh 0;
}

.selection-qr-container img {
    width: 16vw;
    height: auto;
}

.selection-qr-url {
    font-size: 1vw;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
}

.selection-prompts-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.selection-prompts-placeholder {
    text-align: left;
}

.selection-prompts-placeholder p {
    font-size: 6vw;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    width: 100%;
}

.selection-progress-row {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2vw;
}

.selection-timer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5vh;
    flex-shrink: 0;
}

.selection-timer-bottom .selection-time {
    font-size: 3vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.selection-timer-bottom .selection-seconds {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
}

.selection-timer-bottom .selection-complete,
.selection-timer-bottom .selection-waiting {
    font-size: 1vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

/* ============================================
   PHASE DISPLAY
   The main phase view: supertitle, player
   name, prompt card, and timer.
   ============================================ */
.phase {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2vh;
}

/* --- Phase Header (type + player + round info) --- */
.phase .info {
    flex-shrink: 0;
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
}

.phase .info h2 {
    font-weight: 600;
    font-size: 1.2em;
    color: #ffffff;
    text-transform: uppercase;
}

.phase .info h3 {
    font-weight: 800;
    color: #ffffff;
    font-size: 6vw;
    line-height: 1.1;
    margin-top: 1vh;
}

.phase .info .meta {
    font-weight: 400;
    font-size: 1em;
    color: #ffffff;
    opacity: 0.5;
    margin-top: 0.5vh;
}

/* --- Prompt Card --- */
.phase .prompt {
    background: #2D2D2D;
    border: 1px solid #3F3D3D;
    border-radius: 10px;
    padding: 40px;
    flex-shrink: 0;
}

.phase .prompt h4 {
    font-weight: 600;
    font-size: 1em;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.phase .prompt p {
    font-weight: 700;
    font-size: 3vw;
    line-height: 1.3;
    color: #ffffff;
    word-wrap: break-word;
    text-align: left;
}

/* --- Timer Section --- */
.phase .timer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: none;
    padding: 0;
    margin-top: 0;
}

.phase .timer .label {
    font-weight: 600;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    opacity: 0.5;
    margin-bottom: 2vh;
}

.phase .timer .time {
    font-size: 15vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: "Inter", sans-serif;
}

.phase .timer .time.urgent {
    color: #ff4444;
    animation: pulse-urgent 1s infinite;
}

@keyframes pulse-urgent {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.phase .timer .seconds {
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.4;
    margin-top: 1vh;
}

/* --- Progress Bar --- */
.phase .timer .bar {
    width: 60%;
    height: 8px;
    background: #3F3D3D;
    border-radius: 4px;
    overflow: hidden;
    margin: 3vh auto 1vh;
    border: none;
    position: relative;
}

.phase .timer .bar .fill {
    height: 100%;
    background: #ffffff;
    border-radius: 4px;
    transition: width 1s linear;
}

.phase .timer .time-info {
    font-size: 0.9em;
    opacity: 0.3;
    margin-top: 0.5vh;
}

/* --- Phase Complete --- */
.phase .timer .complete {
    font-size: 3vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

/* --- Waiting to Start --- */
.phase .timer .waiting-start {
    font-size: 2vw;
    font-weight: 400;
    color: #ffffff;
    opacity: 0.5;
}

/* --- Debate Layout (side-by-side: votes + timer) --- */
.phase--debate {
    gap: 2vh;
}

.debate-body {
    flex: 1;
    display: flex;
    gap: 40px;
    align-items: center;
    min-height: 0;
}

.debate-votes {
    flex: 1 1 0;
    min-width: 0;
}

/* --- Vote Chart (pie + legend) --- */
.vc-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}

.vc-pie {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    transform: rotate(-90deg);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
    border-radius: 50%;
    overflow: hidden;
}

.vc-slice {
    transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease;
}

.vc-slice--preview {
    opacity: 0.25;
}

.vc-legend {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 180px;
}

.vc-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vc-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.vc-name {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    color: #ffffff;
}

.vc-pct {
    font-size: 2rem;
    font-weight: bold;
    min-width: 4ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
}

.vc-footer {
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.45;
    padding-top: 8px;
    color: #ffffff;
}


/* ============================================
   ROUND RESULTS (winner + leaderboard)
   ============================================ */
.round-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 4vh 4vw;
    animation: fadeIn 0.6s ease;
    overflow: hidden;
}

.winner-announcement {
    text-align: center;
    margin-bottom: 4vh;
}

.winner-label {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.6;
    color: #ffffff;
    margin-bottom: 1.5vh;
}

.winner-card {
    display: inline-flex;
    align-items: center;
    gap: 1.5vw;
    padding: 2vh 3vw;
    border-radius: 10px;
    animation: fadeIn 0.8s ease 0.3s both;
}

.winner-name {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
}

.winner-points {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 500;
    opacity: 0.85;
}

/* Leaderboard shared by round results + game over */
.leaderboard {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.leaderboard-title {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    opacity: 0.5;
    color: #ffffff;
    margin-bottom: 2vh;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 1vh;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 1vw;
    padding: 1.5vh 2vw;
    background: #2D2D2D;
    border: 1px solid #3F3D3D;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.leaderboard-first {
    border-color: rgba(255, 215, 0, 0.5);
    background: #353530;
}

.leaderboard-rank {
    font-size: clamp(1rem, 2vw, 1.6rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    min-width: 2.5vw;
    text-align: center;
}

.leaderboard-first .leaderboard-rank {
    color: #ffd700;
}

.leaderboard-color {
    width: clamp(12px, 1.5vw, 20px);
    height: clamp(12px, 1.5vw, 20px);
    border-radius: 50%;
    flex-shrink: 0;
}

.leaderboard-name {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 500;
    color: #ffffff;
    flex: 1;
}

.leaderboard-score {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    min-width: 3vw;
    text-align: right;
}

.final-leaderboard {
    margin-top: 3vh;
    margin-bottom: 2vh;
}


/* ============================================
   IMPROV TIME (between rounds)
   ============================================ */
.improv-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4vh 4vw;
    animation: fadeIn 0.6s ease;
}

.improv-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2vh;
    letter-spacing: -0.02em;
}

.improv-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6vh;
}

.improv-decoration {
    display: flex;
    gap: 3vw;
}

.improv-spotlight {
    width: clamp(20px, 3vw, 40px);
    height: clamp(20px, 3vw, 40px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, rgba(255, 215, 0, 0) 70%);
    animation: pulse-spotlight 2s ease-in-out infinite;
}

.improv-spotlight:nth-child(2) {
    animation-delay: 0.4s;
}

.improv-spotlight:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes pulse-spotlight {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}


/* ============================================
   COMPLICATION WHEEL
   ============================================ */
.complication-wheel-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4vh 4vw 6vh;
    background:
        radial-gradient(circle at top, rgba(224, 92, 92, 0.18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(91, 155, 213, 0.16), transparent 30%),
        linear-gradient(180deg, #171515 0%, #1f1c1c 100%);
    text-align: center;
}

.complication-wheel-title {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-top: 1vh;
}

.complication-wheel-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.65);
    margin-top: 1vh;
}

.complication-wheel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    width: min(100%, 1040px);
    margin-top: 4vh;
}

.complication-wheel-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(72vh, 72vw, 760px);
    aspect-ratio: 1;
    padding: clamp(14px, 2vw, 24px);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 62%, transparent 63%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.38),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.complication-wheel-pointer {
    position: absolute;
    top: -0.3em;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.complication-wheel-canvas {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.35));
}

.complication-wheel-status {
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.complication-result-card {
    width: min(100%, 900px);
    padding: clamp(24px, 5vw, 52px);
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(224, 92, 92, 0.2), rgba(91, 155, 213, 0.18)),
        rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.complication-result-kicker {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
}

.complication-result-text {
    margin-top: 2vh;
    font-size: clamp(2.1rem, 4.5vw, 4.4rem);
    font-weight: 800;
    line-height: 1.08;
    color: #ffffff;
    text-wrap: balance;
}


/* ============================================
   QR CODE DISPLAY
   ============================================ */

/* Prominent QR code - for show opener and selection phase */
.qr-prominent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-prominent-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.qr-prominent-code {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-prominent-code img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.qr-prominent-url {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

/* Corner QR code - persistent but subtle */
.qr-corner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
}

.qr-corner:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.qr-corner-code {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-corner-code img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.qr-corner-text {
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    text-align: center;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   HOST CONTROL PANEL STYLES
   ============================================ */

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-success: #059669;
    --color-success-dark: #047857;
    --color-warning: #d97706;
    --color-warning-dark: #b45309;
    --color-danger: #dc2626;
    --color-danger-dark: #b91c1c;
    --color-secondary: #6b7280;
    --color-secondary-dark: #4b5563;
    --color-bg-light: #f9fafb;
    --color-bg-dark: #1f2937;
    --color-border: #e5e7eb;
    --color-text: #111827;
    --color-text-light: #6b7280;
}

.host-panel {
    min-height: 100vh;
    background: var(--color-bg-light);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.host-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 24px 40px;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.host-header h1 {
    font-size: 1.875rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.host-header .subtitle {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 10px;
    margin-top: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.host-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 40px;
}

.host-dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.host-resources-panel {
    position: sticky;
    top: 24px;
    margin-bottom: 0;
}

.host-resources-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.host-resource-link {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    background: #fff;
}

.host-resource-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateX(2px);
}

.host-resource-link.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.host-resource-content {
    margin-bottom: 0;
}

.game-detail-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-detail-container .host-section {
    margin-bottom: 0;
    padding: 24px;
}

.host-section {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.host-section h2 {
    font-size: 1.375rem;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 12px;
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.section-description {
    margin: 6px 0 0 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: normal;
}

.count-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.create-game-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--color-primary);
}

/* Buttons */
.host-btn {
    background: #fff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.host-btn:hover {
    background: var(--color-bg-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.host-btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.host-btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.host-btn-success {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

.host-btn-success:hover {
    background: var(--color-success-dark);
    border-color: var(--color-success-dark);
}

.host-btn-warning {
    background: var(--color-warning);
    color: #fff;
    border-color: var(--color-warning);
}

.host-btn-warning:hover {
    background: var(--color-warning-dark);
    border-color: var(--color-warning-dark);
}

.host-btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}

.host-btn-danger:hover {
    background: var(--color-danger-dark);
    border-color: var(--color-danger-dark);
}

.host-btn-secondary {
    background: #fff;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.host-btn-secondary:hover {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.host-btn-small {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.2rem;
    width: 100%;
    margin-top: 10px;
}

/* Forms */
.host-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.host-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.host-checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.form-note {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--color-text-light);
}

.player-selection-group {
    margin-top: 14px;
}

.player-dropdown {
    margin-top: 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.player-dropdown-summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--color-text-light);
    user-select: none;
}

.player-dropdown-summary::-webkit-details-marker {
    display: none;
}

.player-dropdown-summary::after {
    content: "▾";
    float: right;
    color: var(--color-text-light);
}

.player-dropdown[open] .player-dropdown-summary::after {
    content: "▴";
}

.player-dropdown-search-wrap {
    padding: 0 12px 10px;
    border-top: 1px solid var(--color-border);
}

.player-search-input {
    margin-top: 10px;
}

.player-dropdown-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--color-border);
    max-height: 220px;
    overflow-y: auto;
}

.player-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.player-dropdown-item:hover {
    border-color: var(--color-primary);
}

.player-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.player-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.player-checkbox-item:hover {
    border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .player-dropdown-list {
        grid-template-columns: 1fr;
    }
}

.add-form {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--color-bg-light);
    border-radius: 6px;
}

.add-form-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.add-form-group.vertical {
    flex-direction: column;
}

.add-form-group.vertical .form-row {
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.host-input,
.host-select,
.host-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.host-input:focus,
.host-select:focus,
.host-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.host-textarea {
    resize: vertical;
    min-height: 60px;
}

.inline-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Game List */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-row {
    border: 1px solid var(--color-border);
    padding: 14px 16px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.game-row.active {
    background: rgba(37, 99, 235, 0.06);
    border-color: var(--color-primary);
}

.game-row-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.game-row-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-row h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.game-row-meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.meta-separator {
    display: inline-block;
    margin: 0 6px;
    color: var(--color-border);
}

.badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-active {
    background: var(--color-success);
    color: #fff;
}

.game-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Status Box */
.status-box {
    border: 1px solid var(--color-border);
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: var(--color-bg-light);
}

.status-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.status-row:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--color-text-light);
    letter-spacing: 0.5px;
}

.status-value {
    font-family: inherit;
    font-weight: 500;
}

.status-value.active {
    font-weight: 700;
    color: var(--color-success);
}

/* Item Lists */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-prompt-section .section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.player-prompt-section .section-description {
    max-width: 34rem;
    line-height: 1.45;
}

.player-prompt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.player-prompt-tab {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg-light);
    color: var(--color-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.player-prompt-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.player-prompt-tab.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.2s;
}

.item-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.item-info {
    flex: 1;
}

.prompt-player-card {
    gap: 14px;
    padding: 14px 16px;
    align-items: flex-start;
}

.prompt-player-card .item-info {
    min-width: 0;
}

.prompt-player-card .prompt-text {
    overflow-wrap: anywhere;
}

.prompt-player-card.is-claimed-by-other {
    opacity: 0.5;
}

.prompt-player-card .host-btn {
    flex-shrink: 0;
}

.item-meta {
    display: block;
    margin-top: 2px;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.resource-player-card {
    padding: 10px 14px;
}

.form-error {
    color: var(--color-danger);
    margin: 12px 0 16px;
    font-weight: 600;
}

.subview-header {
    margin-top: 28px;
}

.item-name {
    font-weight: 600;
    font-size: 1rem;
}

/* Player Links Section */
.player-links-section {
    margin-top: 16px;
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
}

.player-links-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.player-links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-link-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.player-link-name {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 90px;
    flex-shrink: 0;
}

.player-link-url {
    flex: 1;
    font-size: 0.75rem;
    color: var(--color-primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

.player-link-url:hover {
    text-decoration: underline;
}

.prompt-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.prompt-content {
    flex: 1;
}

.prompt-text {
    margin: 0 0 8px 0;
    line-height: 1.6;
    color: var(--color-text);
    font-size: 0.95rem;
}

.prompt-meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.prompt-card button {
    align-self: flex-end;
}

.host-section .prompts-list {
    gap: 8px;
}

.host-section .prompts-list .prompt-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-left: none;
    box-shadow: none;
    opacity: 1;
    animation: none;
    transform: none;
}

.host-section .prompts-list .prompt-card:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.host-section .prompts-list .prompt-content {
    margin-bottom: 0;
}

.host-section .prompts-list .prompt-text {
    margin: 0 0 3px 0;
    line-height: 1.35;
    font-size: 0.95rem;
}

.host-section .prompts-list .prompt-meta {
    display: block;
    font-size: 0.78rem;
}

.host-section .prompts-list .prompt-card button {
    align-self: center;
    margin-left: 6px;
    flex-shrink: 0;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}

.item:hover {
    background: var(--color-bg-light);
}

.host-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.host-prompt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.host-prompt-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.host-prompt-item-inactive {
    opacity: 0.7;
    border-style: dashed;
}

.host-prompt-content {
    min-width: 0;
    flex: 1;
}

.host-prompt-text {
    margin: 0 0 3px 0;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.35;
    font-style: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.host-prompt-meta {
    display: block;
    color: var(--color-text-light);
    font-size: 0.78rem;
}

.host-prompt-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.host-prompt-badge-public {
    background: #e0f2fe;
    color: #075985;
}

.host-prompt-badge-in-house {
    background: #fef3c7;
    color: #92400e;
}

.host-prompt-delete {
    flex-shrink: 0;
}

.host-prompt-source-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    margin-bottom: 14px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 999px;
}

.host-source-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
}

.host-source-option:has(input:checked) {
    background: #dbeafe;
    color: #1e40af;
}

.host-source-option input {
    accent-color: var(--color-primary);
}

.item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 600;
}

.prompt-item {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--color-border);
    margin-bottom: 12px;
    border-radius: 6px;
    background: #fff;
}

.prompt-item:hover {
    background: var(--color-bg-light);
}

.prompt-content {
    flex: 1;
    margin-bottom: 12px;
}

.prompt-text {
    margin: 0 0 8px 0;
    line-height: 1.5;
    color: var(--color-text);
}

.prompt-meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.prompt-origin {
    margin: 0 0 4px 0;
    font-size: 0.8rem;
    color: var(--color-primary-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prompt-pool {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px;
    background: var(--color-bg-light);
}

.prompt-pool h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text);
}

.prompt-pool--in-house {
    border-color: #f59e0b;
    background: #fffbeb;
}

.prompt-pool--public {
    border-color: #60a5fa;
    background: #eff6ff;
}

.prompt-pool-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.selection-preview-stage {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-preview-card {
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    will-change: opacity, transform;
}

.selection-preview-card--animating {
    animation: selection-preview-cycle 680ms ease-in-out;
}

.selection-preview-text {
    margin: 0;
    font-size: 7.5vw;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: normal;
    width: 100%;
}

.selection-preview-meta {
    margin: 0;
    font-size: 0;
    display: none;
}

@keyframes selection-preview-cycle {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 700px) {
    .selection-preview-stage {
        margin-bottom: 1rem;
    }

    .complication-wheel-shell {
        width: min(86vw, 620px);
    }

    .complication-result-card {
        padding: 24px;
    }
}

.prompt-item button {
    align-self: flex-end;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--color-success);
    color: #065f46;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--color-warning);
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--color-primary);
    color: #1e40af;
}

/* Round Status */
.round-status {
    border: 2px solid var(--color-primary);
    padding: 24px;
    border-radius: 8px;
    background: #fff;
}

.round-status h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 700;
}

.phase-info {
    border: 1px solid var(--color-border);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: var(--color-bg-light);
}

.phase-header h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--color-text);
    font-weight: 600;
}

.player-name {
    margin: 5px 0 0 0;
    font-size: 1rem;
    color: var(--color-text-light);
}

.host-phase-timer {
    margin: 15px 0;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    text-align: center;
    border-radius: 8px;
}

.timer {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: inherit;
}

.phase-actions {
    margin-top: 15px;
}

.round-top-controls {
    position: sticky;
    top: 14px;
    z-index: 8;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.phase-progress.compact-flow {
    margin: 0;
}

.phase-progress.compact-flow h4 {
    margin: 0 0 8px 0;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.phase-timeline-node-rail {
    overflow-x: auto;
    padding-bottom: 4px;
}

.phase-timeline-nodes {
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-width: 100%;
}

.phase-node {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.phase-node-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--color-border);
    color: var(--color-text-light);
    background: #fff;
    flex-shrink: 0;
}

.phase-node-index {
    font-size: 0.82rem;
    font-weight: 700;
}

.phase-node-body {
    min-width: 0;
}

.phase-node-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}

.phase-node-player {
    margin-left: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-light);
}

.phase-node-status {
    margin-top: 1px;
    font-size: 0.72rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.phase-node-connector {
    width: 26px;
    height: 2px;
    margin: 0 8px;
    background: var(--color-border);
    flex-shrink: 0;
}

.phase-node.done .phase-node-marker {
    border-color: var(--color-success);
    background: var(--color-success);
    color: #fff;
}

.phase-node.active .phase-node-marker {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.phase-node.active .phase-node-title,
.phase-node.active .phase-node-status {
    color: var(--color-primary);
}

.phase-node-connector.done {
    background: var(--color-success);
}

.action-strip {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(160px, auto) minmax(220px, 1fr) minmax(180px, 1fr);
    gap: 10px;
    align-items: center;
}

.action-strip .host-btn {
    margin-top: 0;
    width: 100%;
}

.action-strip .timer-controls {
    display: flex;
    align-items: center;
}

.action-strip .timer-controls .host-btn,
.action-strip .timer-controls .action-hint {
    width: 100%;
    margin: 0;
}

.phase-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phase-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.phase-item.completed {
    opacity: 0.5;
    text-decoration: line-through;
    color: var(--color-text-light);
}

.phase-item.active {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.phase-order {
    font-weight: 600;
    min-width: 32px;
    color: var(--color-primary);
}

.phase-item.active .phase-order {
    color: #fff;
}

.phase-name {
    flex: 1;
}

.phase-status {
    font-size: 1.2rem;
}

.no-round {
    text-align: center;
    padding: 48px 20px;
}

.info-text {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--color-text-light);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
    background: var(--color-bg-light);
    border-radius: 6px;
}

.empty-state p:first-child {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.empty-hint {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.ready-message,
.completion-message {
    max-width: 500px;
    margin: 0 auto;
}

.ready-message h3,
.completion-message h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

.completion-message {
    padding: 32px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 2px solid var(--color-success);
    border-radius: 8px;
}

.helper-text {
    margin-bottom: 24px;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.start-round-container {
    margin-top: 20px;
}

.alert strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.alert p {
    margin: 0;
    font-size: 0.9rem;
}

/* Prompt Selection Interface */
.prompt-selection-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.prompt-selection-section h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 600;
}

.section-hint {
    margin: 0 0 20px 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.player-prompt-assignments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-assignment-card {
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s;
}

.prompt-assignment-card.assigned {
    border-color: var(--color-success);
    background: #f8fffb;
}

.prompt-assignment-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.compact-assignment {
    overflow: hidden;
}

.compact-summary {
    list-style: none;
    cursor: pointer;
    margin: 0;
}

.compact-summary::-webkit-details-marker {
    display: none;
}

.compact-summary::after {
    content: "▾";
    color: var(--color-text-light);
    font-size: 0.92rem;
    margin-left: 10px;
}

.compact-assignment[open] .compact-summary::after {
    content: "▴";
}

.assignment-row-meta {
    margin-bottom: 8px;
}

.compact-prompt-preview {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-light);
    line-height: 1.35;
}

.compact-link-row {
    margin-bottom: 8px;
}

.compact-assignment:not([open]) .compact-link-row,
.compact-assignment:not([open]) .prompt-assignment-form {
    display: none;
}

.player-name-large {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--color-text);
}

.assignment-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assignment-status.completed {
    background: var(--color-success);
    color: #fff;
}

.assignment-status.pending {
    background: var(--color-warning);
    color: #fff;
}

.assigned-prompt {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border-left: 3px solid var(--color-success);
}

.prompt-text-preview {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
}

.prompt-assignment-form {
    margin-top: 8px;
}

.warning-hint {
    color: var(--color-warning);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 12px;
    background: #fffbeb;
    border-radius: 6px;
    border-left: 3px solid var(--color-warning);
}

/* Responsive */
@media (max-width: 1024px) {
    .game-detail-container {
        grid-template-columns: 1fr;
    }

    .phase-header {
        flex-direction: column;
        gap: 16px;
    }

    .phase-timer {
        width: 100%;
    }

    .round-top-controls {
        top: 10px;
    }

    .action-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .host-container {
        padding: 20px;
    }

    .player-prompt-section {
        padding: 20px;
    }

    .player-prompt-section .section-header {
        margin-bottom: 16px;
    }

    .player-prompt-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-prompt-tab {
        width: 100%;
        padding: 0 8px;
        text-align: center;
    }

    .prompt-player-card {
        flex-direction: column;
        align-items: stretch;
    }

    .prompt-player-card .host-btn {
        width: 100%;
        justify-content: center;
    }

    .host-dashboard-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .host-resources-panel {
        position: static;
    }

    .host-resources-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .game-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-row-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .meta-separator {
        display: none;
    }

    .game-row-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-actions {
        flex-direction: column;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .form-row {
        flex-direction: column;
    }

    .add-form-group:not(.vertical) {
        flex-direction: column;
    }

    .timer-value {
        font-size: 1.75rem;
    }

    .round-top-controls {
        top: 8px;
        margin-left: -2px;
        margin-right: -2px;
    }

    .phase-node {
        min-width: 132px;
    }

    .phase-node-title {
        font-size: 0.78rem;
    }
}

/* ============================================
   HOST — SCORE CONTROLS
   ============================================ */
.score-controls {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.score-controls h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.score-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.score-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.score-player-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.score-value {
    font-weight: 700;
    font-size: 1rem;
    min-width: 50px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.score-actions {
    display: flex;
    gap: 6px;
}

.score-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
}

/* ============================================
   AUDIENCE PAGE - minimal phone-first override
   ============================================ */

.audience-page {
    --aud-yellow: #FFE600;
    --aud-pink: #FF2D7A;
    --aud-purple: #8A2BE2;
    --aud-teal: #00C2A8;
    --aud-orange: #FF8C42;
    --aud-ink: #18151f;
    --aud-muted: #443d4c;
    --aud-border: #18151f;
    --aud-surface: #fff;
    --aud-soft-yellow: #fff9b8;
    --aud-soft-pink: #ffe2ec;
    --aud-soft-purple: #f0e3ff;
    --aud-soft-teal: #dffff9;
    --aud-soft-orange: #fff0e6;
    --aud-mode: var(--aud-pink);
    --aud-mode-soft: var(--aud-soft-pink);
    --aud-mode-ink: #fff;
    --aud-font-body: "Public Sans", "Inter", system-ui, sans-serif;
    --aud-font-display: "Archivo Black", "Public Sans", "Inter", system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--aud-yellow);
    color: var(--aud-ink);
    font-family: var(--aud-font-body);
    padding: 24px 16px;
    animation: none;
}

.audience-page .floating-shapes,
.audience-page .sparkle,
.audience-page .subtitle-wrapper,
.audience-page .instruction-box,
.audience-page .recent-prompts,
.audience-page .recent-submissions,
.audience-page .audience-footer {
    display: none;
}

.audience-page .audience-container,
.audience-page .vote-container {
    width: min(100%, 520px);
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.audience-page .audience-container--waiting,
.audience-page .audience-container--ending {
    --aud-mode: var(--aud-orange);
    --aud-mode-soft: var(--aud-soft-orange);
    --aud-mode-ink: var(--aud-ink);
}

.audience-page .audience-container--submit {
    --aud-mode: var(--aud-pink);
    --aud-mode-soft: var(--aud-soft-pink);
    --aud-mode-ink: #fff;
}

.audience-page .audience-container--vote {
    --aud-mode: var(--aud-purple);
    --aud-mode-soft: var(--aud-soft-purple);
    --aud-mode-ink: #fff;
}

.audience-page .audience-container--flag {
    --aud-mode: var(--aud-pink);
    --aud-mode-soft: var(--aud-soft-pink);
    --aud-mode-ink: #fff;
}

.audience-page .audience-header {
    margin: 0 0 24px;
    color: var(--aud-ink);
    text-align: left;
}

.audience-page .audience-header::before {
    content: "";
    display: block;
    width: 52px;
    height: 6px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--aud-mode);
}

.audience-page .audience-header h1,
.audience-page .aud-waiting h1,
.audience-page .vote-status h2,
.audience-page .submission-closed h2,
.audience-page .error-message h2,
.audience-page .success-message h2 {
    margin: 0;
    background: none;
    color: var(--aud-ink);
    font-family: var(--aud-font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
}

.audience-page .audience-header .subtitle,
.audience-page .aud-waiting p,
.audience-page .vote-status p,
.audience-page .submission-closed p,
.audience-page .error-message p,
.audience-page .success-message p,
.audience-page .vote-hint {
    margin: 10px 0 0;
    color: var(--aud-muted);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
    opacity: 1;
    text-transform: none;
}

.audience-page .audience-content,
.audience-page #submit-form-container,
.audience-page #vote-area,
.audience-page #improv-flag-area,
.audience-page .flag-panel {
    display: block;
    width: 100%;
}

.audience-page .audience-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.audience-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audience-page .form-group label {
    display: block;
    color: var(--aud-ink);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.audience-page .form-group label span {
    color: var(--aud-muted);
    font-weight: 500;
}

.audience-page .audience-textarea,
.audience-page .audience-input {
    width: 100%;
    border: 2px solid var(--aud-ink);
    border-radius: 8px;
    background: var(--aud-surface);
    color: var(--aud-ink);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
    padding: 14px 16px;
    transform: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.audience-page .audience-textarea {
    min-height: 132px;
    resize: vertical;
}

.audience-page .audience-textarea:focus,
.audience-page .audience-input:focus {
    outline: none;
    border-color: var(--aud-mode);
    box-shadow: 0 0 0 3px var(--aud-mode-soft);
    transform: none;
}

.audience-page .audience-textarea--error,
.audience-page .audience-input--error {
    border-color: var(--aud-pink) !important;
    box-shadow: none !important;
}

.audience-page .audience-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--aud-font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 16px 20px;
    text-align: center;
    transform: none;
    transition: none;
    -webkit-tap-highlight-color: transparent;
}

.audience-page .audience-btn::before {
    display: none;
}

.audience-page .audience-btn-primary {
    background: var(--aud-mode);
    color: var(--aud-mode-ink);
    box-shadow: none;
}

.audience-page .audience-btn-secondary {
    background: var(--aud-orange);
    color: var(--aud-ink);
    box-shadow: none;
}

.audience-page .audience-btn:active,
.audience-page .vote-btn:active {
    transform: translateY(1px);
}

.audience-page .aud-waiting,
.audience-page .vote-status,
.audience-page .submission-closed,
.audience-page .error-message,
.audience-page .success-message {
    border: 2px solid var(--aud-border);
    border-radius: 8px;
    background: var(--aud-surface);
    border-left-color: var(--aud-mode);
    border-left-width: 8px;
    padding: 24px;
    text-align: left;
    box-shadow: none;
}

.audience-page .error-message {
    border-color: var(--aud-ink);
    border-left-color: var(--aud-pink);
    background: #fff7fa;
    margin-bottom: 18px;
}

.audience-page .error-message h2,
.audience-page .error-message .error-detail {
    color: #9f174f;
}

.audience-page .submission-closed {
    border-color: var(--aud-ink);
    border-left-color: var(--aud-orange);
    background: #fff9f4;
}

.audience-page .success-message {
    border-color: var(--aud-ink);
    border-left-color: var(--aud-teal);
    background: #f3fffc;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.audience-page .success-message h2 {
    color: #087f72;
}

.audience-page .vote-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.audience-page .vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 72px;
    border: 2px solid var(--aud-ink);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--aud-font-display);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 18px 16px;
    text-align: center;
    text-transform: none;
    overflow-wrap: anywhere;
    box-shadow: none;
    transition: none;
    -webkit-tap-highlight-color: transparent;
}

.audience-page .vote-btn-selected {
    border-color: var(--aud-ink);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.78);
    transform: none;
}

.audience-page .vote-grid .vote-btn:nth-child(5n+1) {
    background-color: var(--aud-pink) !important;
    color: #fff !important;
}

.audience-page .vote-grid .vote-btn:nth-child(5n+2) {
    background-color: var(--aud-purple) !important;
    color: #fff !important;
}

.audience-page .vote-grid .vote-btn:nth-child(5n+3) {
    background-color: var(--aud-teal) !important;
    color: var(--aud-ink) !important;
}

.audience-page .vote-grid .vote-btn:nth-child(5n+4) {
    background-color: var(--aud-orange) !important;
    color: var(--aud-ink) !important;
}

.audience-page .vote-grid .vote-btn:nth-child(5n+5) {
    background-color: var(--aud-yellow) !important;
    color: var(--aud-ink) !important;
}

.audience-page .vote-btn-name {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.audience-page .vote-btn-check {
    flex: 0 0 auto;
    font-size: 1.3rem;
    line-height: 1;
}

.audience-page .vote-hint {
    text-align: center;
}

@media (min-width: 640px) {
    .audience-page {
        padding: 40px 24px;
    }

    .audience-page .audience-header h1,
    .audience-page .aud-waiting h1,
    .audience-page .vote-status h2,
    .audience-page .submission-closed h2,
    .audience-page .error-message h2,
    .audience-page .success-message h2 {
        font-size: 2.25rem;
    }
}

/* ============= UNIFIED TOP ROW ============= */

.unified-top-row {
    display: flex;
    align-items: center;
    gap: 2vw;
    flex-shrink: 0;
    width: 100%;
}

.unified-title {
    font-size: 1.5vw;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
    flex-shrink: 0;
}

.unified-progress-bar {
    flex: 1;
    height: 0.5vh;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.25vh;
    overflow: hidden;
}

.unified-progress-fill {
    height: 100%;
    background: #ffffff;
    transition: width 0.3s ease-out;
}

.unified-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5vh;
    flex-shrink: 0;
}

.unified-time {
    font-size: 3vw;
    font-weight: 200;
    color: #ffffff;
    line-height: 1;
}

.unified-time.urgent {
    color: #ff4444;
    animation: pulse 0.5s ease-in-out infinite;
}

.unified-seconds {
    font-size: 1vw;
    font-weight: 500;
    color: #ffffff;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.unified-complete,
.unified-waiting {
    font-size: 1.2vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.8;
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
