/* ── CSS Variables ── */
:root {
    --arcade-bg: #0a0a12;
    --arcade-surface: #12121e;
    --arcade-border: #1e1e2e;
    --arcade-text: #e0e0e0;
    --arcade-muted: #666;
    --arcade-cyan: #00fff0;
    --arcade-magenta: #ff2d95;
    --arcade-green: #00ff41;
    --arcade-yellow: #ffe600;
    --arcade-purple: #b388ff;
    --arcade-font: 'Press Start 2P', monospace;
    --arcade-body-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    min-height: 100%;
}

body {
    font-family: var(--arcade-body-font);
    background: var(--arcade-bg);
    color: var(--arcade-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.06) 0px,
        rgba(0, 0, 0, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* CRT flicker */
@keyframes crt-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}
body {
    animation: crt-flicker 4s infinite;
}

/* ── Nav ── */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background: var(--arcade-surface);
    border-bottom: 2px solid var(--arcade-border);
    box-shadow: 0 2px 20px rgba(0, 255, 240, 0.05);
}

.nav-brand {
    font-family: var(--arcade-font);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--arcade-cyan);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(0, 255, 240, 0.5), 0 0 20px rgba(0, 255, 240, 0.2);
}

.nav-brand:hover {
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 255, 240, 0.8), 0 0 30px rgba(0, 255, 240, 0.4);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    color: var(--arcade-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s, text-shadow 0.2s;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
}

.nav-links a:hover {
    color: var(--arcade-cyan);
    text-shadow: 0 0 8px rgba(0, 255, 240, 0.4);
}

/* ── Main Content ── */
main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 3rem 0 2.5rem;
}

@keyframes neon-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 255, 240, 0.6), 0 0 20px rgba(0, 255, 240, 0.3), 0 0 40px rgba(0, 255, 240, 0.15);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 45, 149, 0.6), 0 0 20px rgba(255, 45, 149, 0.3), 0 0 40px rgba(255, 45, 149, 0.15);
    }
}

.site-title {
    font-family: var(--arcade-font);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1.3;
    animation: neon-glow 4s ease-in-out infinite;
}

.site-subtitle {
    margin-top: 0.8rem;
    font-family: var(--arcade-font);
    font-size: 0.65rem;
    color: var(--arcade-muted);
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

.site-subtitle-hint {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: #444;
    font-weight: 400;
}

/* ── Category Filter Bar ── */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid var(--arcade-border);
    background: transparent;
    color: var(--arcade-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--arcade-cyan);
    color: var(--arcade-cyan);
    background: rgba(0, 255, 240, 0.05);
}

.filter-btn.active {
    background: var(--arcade-cyan);
    color: var(--arcade-bg);
    border-color: var(--arcade-cyan);
}

/* ── Game List (one per line) ── */
.games-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 3rem;
}

.game-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-row:hover {
    border-color: var(--arcade-cyan);
    box-shadow: 0 0 16px rgba(0, 255, 240, 0.08), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.game-row-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
    width: 3rem;
    text-align: center;
    filter: drop-shadow(0 0 6px rgba(0, 255, 240, 0.3));
}

.game-row-info {
    flex: 1;
    min-width: 0;
}

.game-row-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.game-row-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.game-row-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
}

.badge-party {
    background: rgba(255, 230, 0, 0.15);
    color: var(--arcade-yellow);
    border: 1px solid rgba(255, 230, 0, 0.3);
}

.badge-brain {
    background: rgba(179, 136, 255, 0.15);
    color: var(--arcade-purple);
    border: 1px solid rgba(179, 136, 255, 0.3);
}

.badge-bluffing {
    background: rgba(255, 45, 149, 0.15);
    color: var(--arcade-magenta);
    border: 1px solid rgba(255, 45, 149, 0.3);
}

.badge-action {
    background: rgba(0, 255, 65, 0.15);
    color: var(--arcade-green);
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.game-row-players {
    font-size: 0.75rem;
    color: var(--arcade-muted);
    white-space: nowrap;
}

.game-row-desc {
    font-size: 0.85rem;
    color: var(--arcade-muted);
    line-height: 1.5;
}

.game-row-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--arcade-cyan);
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
    color: var(--arcade-cyan);
    white-space: nowrap;
    text-align: center;
}

.btn-sm:hover {
    background: rgba(0, 255, 240, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 240, 0.2);
}

button.btn-primary.btn-sm {
    background: var(--arcade-cyan);
    color: var(--arcade-bg);
    border-color: var(--arcade-cyan);
}

a.btn-secondary.btn-sm {
    background: transparent;
    color: var(--arcade-text);
    border-color: var(--arcade-border);
}

/* ── Join Page ── */
.join-page {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem 0;
}

.join-title {
    font-family: var(--arcade-font);
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 0 10px rgba(0, 255, 240, 0.4);
}

.join-subtitle {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--arcade-muted);
    margin-bottom: 2rem;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 12px;
    padding: 2rem;
}

.join-form .form-group {
    text-align: left;
}

.join-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--arcade-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    background: var(--arcade-bg);
    color: var(--arcade-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--arcade-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 240, 0.15);
}

.room-code-input {
    text-align: center;
    font-family: var(--arcade-font);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--arcade-cyan);
}

.join-error {
    color: var(--arcade-magenta);
    font-size: 0.85rem;
    min-height: 1.2em;
}

.btn-join {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--arcade-green);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-green);
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.btn-join:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

.btn-join:active {
    transform: scale(0.98);
}

.btn-join:disabled {
    border-color: #333;
    color: #444;
    text-shadow: none;
    cursor: not-allowed;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--arcade-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

.back-link:hover {
    color: var(--arcade-cyan);
    text-shadow: 0 0 6px rgba(0, 255, 240, 0.3);
}

/* ── Host Lobby ── */
.host-page {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.room-code-display {
    font-family: var(--arcade-font);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--arcade-cyan);
    margin: 1rem 0;
    text-shadow: 0 0 15px rgba(0, 255, 240, 0.5), 0 0 30px rgba(0, 255, 240, 0.2);
}

.room-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Persistent QR bar across all host screens */
.host-qr-bar {
    background: var(--arcade-surface);
    border-bottom: 1px solid var(--arcade-border);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
}

.host-qr-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    max-width: 500px;
    margin: 0 auto;
}

.host-qr-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.qr-container {
    padding: 0.5rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--arcade-border);
    display: inline-block;
    line-height: 0;
    flex-shrink: 0;
}

.qr-container img,
.qr-container canvas {
    display: block;
}

.share-link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 360px;
}

.share-link-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    background: var(--arcade-bg);
    color: var(--arcade-muted);
    outline: none;
}

.btn-copy {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    background: var(--arcade-surface);
    color: var(--arcade-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    border-color: var(--arcade-cyan);
    color: var(--arcade-cyan);
}

/* QR button in share bar */
.btn-qr {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    background: var(--arcade-surface);
    color: var(--arcade-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-qr:hover {
    border-color: var(--arcade-cyan);
    color: var(--arcade-cyan);
    background: rgba(0, 255, 240, 0.05);
}

/* QR Modal */
.qr-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.qr-modal-overlay.active {
    display: flex;
}

.qr-modal {
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 255, 240, 0.15), 0 16px 48px rgba(0, 0, 0, 0.5);
}

.qr-modal-title {
    font-family: var(--arcade-font);
    font-size: 0.85rem;
    color: var(--arcade-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.qr-modal-code {
    font-family: var(--arcade-font);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--arcade-cyan);
    text-shadow: 0 0 15px rgba(0, 255, 240, 0.5), 0 0 30px rgba(0, 255, 240, 0.2);
    margin-bottom: 1.25rem;
}

.qr-container-large {
    margin: 0 auto 1rem;
    padding: 0.75rem;
    border-radius: 12px;
}

.qr-modal-url {
    font-size: 0.8rem;
    color: var(--arcade-muted);
    margin-bottom: 1.25rem;
    word-break: break-all;
}

.btn-qr-close {
    padding: 0.6rem 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-text);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-qr-close:hover {
    border-color: var(--arcade-cyan);
    color: var(--arcade-cyan);
}

/* Player list */
.player-list {
    list-style: none;
    margin: 1rem 0;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--arcade-text);
}

.player-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-host {
    background: rgba(0, 255, 240, 0.1);
    color: var(--arcade-cyan);
    border: 1px solid rgba(0, 255, 240, 0.2);
}

.badge-ready {
    background: rgba(0, 255, 65, 0.1);
    color: var(--arcade-green);
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.badge-not-ready {
    background: rgba(255, 230, 0, 0.1);
    color: var(--arcade-yellow);
    border: 1px solid rgba(255, 230, 0, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.connected {
    background: var(--arcade-green);
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
}

.status-dot.disconnected {
    background: #444;
}

.btn-kick {
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(255, 45, 149, 0.3);
    border-radius: 4px;
    background: transparent;
    color: var(--arcade-magenta);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-kick:hover {
    background: rgba(255, 45, 149, 0.1);
}

/* Host controls */
.host-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.game-select {
    flex: 1;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    background: var(--arcade-bg);
    color: var(--arcade-text);
    outline: none;
}

.game-display {
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--arcade-cyan);
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    text-align: center;
}

@keyframes start-btn-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 65, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 65, 0.4); }
}

.btn-start {
    width: 100%;
    padding: 0.85rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid var(--arcade-green);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-green);
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
    animation: start-btn-pulse 2s ease-in-out infinite;
}

.btn-start:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

.btn-start:disabled {
    border-color: #333;
    color: #444;
    text-shadow: none;
    cursor: not-allowed;
    animation: none;
}

.btn-start:active {
    transform: scale(0.98);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--arcade-muted);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #333;
    border-radius: 24px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #888;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(0, 255, 240, 0.3);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--arcade-cyan);
}

/* Panel switching */
.panel { display: none; }
.panel.active { display: block; }

/* ── Player Lobby ── */
.play-page {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.play-header {
    margin-bottom: 1.5rem;
}

.play-name {
    font-family: var(--arcade-font);
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(179, 136, 255, 0.5);
}

.play-room-code {
    font-size: 0.9rem;
    color: var(--arcade-muted);
    margin-top: 0.25rem;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--arcade-muted);
    margin-top: 0.5rem;
}

.btn-ready {
    width: 100%;
    padding: 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid var(--arcade-cyan);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-cyan);
    cursor: pointer;
    transition: all 0.2s;
    margin: 1rem 0;
}

.btn-ready:hover {
    background: rgba(0, 255, 240, 0.05);
    box-shadow: 0 0 15px rgba(0, 255, 240, 0.15);
}

.btn-ready.ready {
    background: var(--arcade-green);
    border-color: var(--arcade-green);
    color: var(--arcade-bg);
    text-shadow: none;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.btn-ready.ready:hover {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4);
}

@keyframes waiting-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.waiting-message {
    font-size: 0.9rem;
    color: var(--arcade-muted);
    margin-top: 1rem;
}

.selected-game {
    font-size: 0.85rem;
    color: var(--arcade-cyan);
    margin-top: 0.5rem;
    font-weight: 600;
}

/* ── Landing page action buttons ── */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid var(--arcade-cyan);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-cyan);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-shadow: 0 0 6px rgba(0, 255, 240, 0.3);
}

.btn-primary:hover {
    background: rgba(0, 255, 240, 0.1);
    color: var(--arcade-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 240, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid var(--arcade-magenta);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-magenta);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-shadow: 0 0 6px rgba(255, 45, 149, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 45, 149, 0.1);
    color: var(--arcade-magenta);
    box-shadow: 0 0 20px rgba(255, 45, 149, 0.2);
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* ── Game Selector (host lobby) ── */
.game-selector {
    text-align: left;
    margin-bottom: 0.75rem;
}

.game-info-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    font-size: 0.85rem;
}

.game-info-name {
    font-weight: 600;
    color: var(--arcade-text);
}

.game-info-players {
    color: var(--arcade-muted);
    font-size: 0.8rem;
}

.game-info-instructions {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #555;
    line-height: 1.4;
    width: 100%;
}

.game-info-card {
    flex-wrap: wrap;
}

/* ── Join Page Game Instructions ── */
.join-game-instructions {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--arcade-muted);
    text-align: center;
}

.join-game-instructions strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    color: var(--arcade-text);
}

.join-game-instructions-text {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.4;
    margin: 0;
}

/* ── Game Panel (in-game) ── */
.game-panel {
    width: 100%;
}

/* ── In-game navigation overlay ── */
.game-nav-overlay {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1001;
    display: flex;
    gap: 0.35rem;
}

.game-nav-btn {
    padding: 0.3rem 0.6rem;
    background: rgba(0, 0, 0, 0.6);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.game-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ── Return to Game button (lobby panel) ── */
.btn-return-to-game {
    width: 100%;
    padding: 0.65rem 1rem;
    margin-bottom: 0.75rem;
    background: #1a3a5c;
    color: #7ec8e3;
    border: 1px solid #2a5a8c;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}

.btn-return-to-game:hover {
    background: #244a6c;
}

/* ── Pong fullscreen game layout ── */
.pong-host,
.pong-player {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pong-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #111;
    width: 100%;
    flex-shrink: 0;
}

.pong-score-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pong-score-left,
.pong-score-right {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.pong-score-separator {
    font-size: 1.2rem;
    color: #555;
}

.pong-canvas-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pong-canvas-wrapper canvas {
    display: block;
}

.pong-countdown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

/* ── Results Panel (post-game) ── */
.results-panel {
    text-align: center;
    padding: 2rem 0;
}

.results-title {
    font-family: var(--arcade-font);
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.4);
}

.scoreboard {
    margin: 1rem auto;
    max-width: 400px;
}

.scoreboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.scoreboard-rank {
    font-weight: 700;
    color: var(--arcade-muted);
    width: 2rem;
}

.scoreboard-name {
    flex: 1;
    font-weight: 600;
    text-align: left;
    margin-left: 0.5rem;
    color: var(--arcade-text);
}

.scoreboard-score {
    font-weight: 700;
    color: var(--arcade-cyan);
}

.btn-return-lobby {
    margin-top: 1.5rem;
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid var(--arcade-cyan);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-cyan);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-return-lobby:hover {
    background: rgba(0, 255, 240, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 240, 0.2);
}

/* ── Section title ── */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--arcade-text);
    margin-bottom: 0.75rem;
    text-align: left;
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: #444;
    font-family: var(--arcade-font);
    font-size: 0.55rem;
    border-top: 1px solid var(--arcade-border);
    letter-spacing: 0.05em;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .site-title {
        font-size: 1.3rem;
    }

    .site-subtitle {
        font-size: 0.55rem;
    }

    .games-list {
        gap: 0.5rem;
    }

    .game-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
    }

    .game-row-icon {
        font-size: 2rem;
        width: auto;
    }

    .game-row-actions {
        flex-direction: row;
        width: 100%;
    }

    .game-row-actions .btn-sm {
        flex: 1;
    }

    .category-filter {
        gap: 0.35rem;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    .site-nav {
        padding: 1rem 1.25rem;
    }

    .nav-brand {
        font-size: 0.7rem;
    }

    main {
        padding: 1rem;
    }

    .room-code-display {
        font-size: 1.8rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        max-width: 280px;
    }

    .join-title {
        font-size: 1rem;
    }
}


/* ── Skull game ───────────────────────────────────────── */

.skull-host,
.skull-player {
    --skull-bg: #1a1a1e;
    --skull-surface: #26262b;
    --skull-surface-raised: #303036;
    --skull-border: #3a3a42;
    --skull-text: #e8e6e3;
    --skull-text-muted: #8a8a8e;
    --skull-flower: #e88a9a;
    --skull-flower-bg: rgba(232, 138, 154, 0.12);
    --skull-skull-color: #b8b0c8;
    --skull-skull-bg: rgba(184, 176, 200, 0.12);
    --skull-accent: #c8a86e;
    --skull-danger: #d45050;
    --skull-success: #5aaa5a;

    background: var(--skull-bg);
    color: var(--skull-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Phase banner */
.skull-phase-banner,
.skull-player-phase {
    text-align: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--skull-border);
    margin-bottom: 1.25rem;
}

.skull-phase-text {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--skull-accent);
    animation: skull-phase-enter 0.4s ease-out;
}

/* Host player cards grid */
.skull-players-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.skull-player-card {
    background: var(--skull-surface);
    border: 1px solid var(--skull-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.skull-player-card:not(.skull-eliminated):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.skull-player-card.skull-current-turn {
    border-left: 3px solid var(--skull-accent);
    box-shadow: 0 0 12px rgba(200, 168, 110, 0.15);
}

.skull-player-card.skull-flipper {
    border-color: var(--skull-accent);
    animation: skull-flipper-pulse 1.5s ease-in-out infinite;
}

.skull-player-card.skull-eliminated {
    opacity: 0.35;
    filter: grayscale(0.5);
}

.skull-player-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--skull-text);
}

.skull-player-pile {
    font-size: 0.8rem;
    color: var(--skull-text-muted);
    margin-bottom: 0.15rem;
    letter-spacing: 0.02em;
}

.skull-player-hand {
    font-size: 0.75rem;
    color: var(--skull-text-muted);
}

.skull-player-status {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skull-turn-indicator {
    background: rgba(200, 168, 110, 0.2);
    color: var(--skull-accent);
}

/* Hand display (player view) */
.skull-hand {
    background: var(--skull-surface);
    border: 1px solid var(--skull-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.skull-hand-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--skull-text-muted);
    margin-bottom: 0.5rem;
}

.skull-hand-cards {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.skull-hand-icons {
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.35rem;
}

.skull-flower-count {
    color: var(--skull-flower);
}

.skull-skull-count {
    color: var(--skull-skull-color);
}

.skull-placed-count {
    font-size: 0.8rem;
    color: var(--skull-text-muted);
    margin-top: 0.35rem;
}

/* Bid display */
.skull-bid-info {
    text-align: center;
    margin-bottom: 0.75rem;
}

.skull-bid-display {
    padding: 0.75rem;
}

.skull-bid-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--skull-text-muted);
}

.skull-bid-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--skull-accent);
    display: block;
    line-height: 1.1;
    animation: skull-bid-pop 0.3s ease-out;
}

.skull-bid-player {
    font-weight: 600;
    color: var(--skull-text);
}

.skull-current-bid-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--skull-accent);
    margin-bottom: 0.75rem;
}

/* Bid input */
.skull-bid-input {
    width: 5rem;
    padding: 0.6rem 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--skull-border);
    border-radius: 8px;
    background: var(--skull-surface);
    color: var(--skull-text);
    outline: none;
    font-family: inherit;
    color-scheme: dark;
    margin-right: 0.5rem;
}

.skull-bid-input:focus {
    border-color: var(--skull-accent);
}

/* Action buttons */
.skull-btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s, opacity 0.15s;
    font-family: inherit;
    margin: 0.25rem;
}

.skull-btn:active {
    transform: scale(0.97);
}

.skull-btn-flower {
    background: var(--skull-flower);
    color: #1a1a1e;
}

.skull-btn-flower:hover {
    box-shadow: 0 0 12px rgba(232, 138, 154, 0.4);
    opacity: 0.9;
}

.skull-btn-skull {
    background: var(--skull-skull-color);
    color: #1a1a1e;
}

.skull-btn-skull:hover {
    box-shadow: 0 0 12px rgba(184, 176, 200, 0.4);
    opacity: 0.9;
}

.skull-btn-start-bid,
.skull-btn-raise,
.skull-btn-flip {
    background: var(--skull-accent);
    color: #1a1a1e;
}

.skull-btn-start-bid:hover,
.skull-btn-raise:hover,
.skull-btn-flip:hover {
    box-shadow: 0 0 12px rgba(200, 168, 110, 0.4);
    opacity: 0.9;
}

.skull-btn-pass {
    background: transparent;
    border: 1px solid var(--skull-border);
    color: var(--skull-text-muted);
}

.skull-btn-pass:hover {
    border-color: var(--skull-text-muted);
    color: var(--skull-text);
}

/* Action layout containers */
.skull-place-buttons,
.skull-bidding-actions,
.skull-turn-actions,
.skull-bid-start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.skull-turn-actions {
    flex-direction: column;
}

/* Flip area */
.skull-flip-actions {
    text-align: center;
}

.skull-flip-progress {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--skull-accent);
    margin-bottom: 0.75rem;
}

.skull-flip-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.skull-flip-info {
    text-align: center;
    font-size: 0.95rem;
    color: var(--skull-text-muted);
    margin-bottom: 0.75rem;
}

/* Flipped card chips */
.skull-flipped-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.skull-flipped-card {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: skull-flip-reveal 0.3s ease-out;
}

.skull-card-flower {
    background: var(--skull-flower-bg);
    color: var(--skull-flower);
    border: 1px solid rgba(232, 138, 154, 0.25);
}

.skull-card-skull {
    background: var(--skull-skull-bg);
    color: var(--skull-skull-color);
    border: 1px solid rgba(184, 176, 200, 0.25);
    animation: skull-flip-reveal 0.3s ease-out, skull-skull-shake 0.4s ease-out 0.3s;
}

/* Status elements */
.skull-waiting {
    text-align: center;
    padding: 1.25rem;
    color: var(--skull-text-muted);
    font-size: 0.9rem;
    animation: skull-pulse-opacity 2s ease-in-out infinite;
}

.skull-passed-info {
    text-align: center;
    font-size: 0.85rem;
    color: var(--skull-text-muted);
    padding: 0.5rem;
}

.skull-eliminated-msg {
    text-align: center;
    padding: 1.5rem;
    color: var(--skull-danger);
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
}

.skull-info-bid {
    text-align: center;
    font-size: 0.85rem;
    color: var(--skull-text-muted);
    padding: 0.5rem;
}

/* Round result */
.skull-result-area {
    margin-bottom: 0.75rem;
}

.skull-round-result {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    animation: skull-result-enter 0.5s ease-out;
}

.skull-result-win {
    background: rgba(90, 170, 90, 0.1);
    border: 1px solid rgba(90, 170, 90, 0.3);
}

.skull-result-fail {
    background: rgba(212, 80, 80, 0.1);
    border: 1px solid rgba(212, 80, 80, 0.3);
    animation: skull-result-enter 0.5s ease-out, skull-skull-shake 0.5s ease-out 0.5s;
}

.skull-result-player {
    font-size: 1.2rem;
    font-weight: 700;
}

.skull-result-win .skull-result-player {
    color: var(--skull-success);
}

.skull-result-fail .skull-result-player {
    color: var(--skull-danger);
}

.skull-result-message {
    font-size: 0.9rem;
    color: var(--skull-text-muted);
    margin-top: 0.5rem;
}

/* Game over */
.skull-game-over {
    text-align: center;
    padding: 2rem;
}

.skull-winner-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--skull-accent);
    animation: skull-winner-glow 2s ease-in-out infinite;
}

/* Scores */
.skull-scores {
    background: var(--skull-surface);
    border: 1px solid var(--skull-border);
    border-radius: 10px;
    padding: 0.75rem;
}

.skull-scores-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--skull-text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
}

.skull-score-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    color: var(--skull-text);
    border-radius: 4px;
}

.skull-score-row.skull-eliminated {
    opacity: 0.35;
    text-decoration: line-through;
}

.skull-score-name {
    font-weight: 600;
}

.skull-score-value {
    font-weight: 700;
    color: var(--skull-accent);
}

.skull-scores-area .skull-scores,
.skull-player-scores .skull-scores {
    margin-top: 1rem;
}

/* Keyframe animations */
@keyframes skull-phase-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes skull-flip-reveal {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes skull-skull-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

@keyframes skull-bid-pop {
    0% { transform: scale(1.3); opacity: 0.6; }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes skull-result-enter {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes skull-winner-glow {
    0%, 100% { text-shadow: 0 0 8px rgba(200, 168, 110, 0.3); }
    50% { text-shadow: 0 0 20px rgba(200, 168, 110, 0.6); }
}

@keyframes skull-pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes skull-flipper-pulse {
    0%, 100% { border-color: var(--skull-accent); box-shadow: 0 0 8px rgba(200, 168, 110, 0.15); }
    50% { border-color: rgba(200, 168, 110, 0.4); box-shadow: 0 0 16px rgba(200, 168, 110, 0.3); }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .skull-host,
    .skull-player {
        padding: 0.75rem;
    }

    .skull-players-area {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .skull-player-card {
        padding: 0.75rem;
    }

    .skull-player-name {
        font-size: 0.85rem;
    }

    .skull-bid-value {
        font-size: 2rem;
    }

    .skull-winner-name {
        font-size: 1.4rem;
    }

    .skull-place-buttons,
    .skull-bidding-actions {
        flex-direction: column;
    }

    .skull-btn {
        width: 100%;
        text-align: center;
    }

    .skull-flip-targets {
        flex-direction: column;
    }

    .skull-flip-targets .skull-btn {
        width: 100%;
    }

    .skull-hand-icons {
        font-size: 1.3rem;
    }
}


/* ── Liar's Dice game ─────────────────────────────────── */

.liarsdice-host,
.liarsdice-player {
    --ld-bg: #181825;
    --ld-surface: #222236;
    --ld-surface-raised: #2e2e48;
    --ld-border: #363650;
    --ld-text: #e4e0d8;
    --ld-text-muted: #7a7890;
    --ld-accent: #d4a843;
    --ld-danger: #e05050;
    --ld-success: #50b050;
    --ld-dice: #f0ece4;

    background: var(--ld-bg);
    color: var(--ld-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Title */
.liarsdice-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ld-accent);
    margin-bottom: 0.75rem;
}

/* Phase label */
.liarsdice-phase-info {
    text-align: center;
    margin-bottom: 1rem;
}

.liarsdice-phase-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ld-accent);
    animation: ld-phase-enter 0.4s ease-out;
}

/* Player rows */
.liarsdice-players-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.liarsdice-player-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.liarsdice-player-row.liarsdice-current-turn {
    border-left: 3px solid var(--ld-accent);
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.12);
}

.liarsdice-player-row.liarsdice-eliminated {
    opacity: 0.3;
    filter: grayscale(0.5);
}

.liarsdice-player-name {
    font-weight: 700;
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.liarsdice-dice-count {
    font-size: 0.85rem;
    color: var(--ld-accent);
    font-weight: 600;
    white-space: nowrap;
}

.liarsdice-turn-indicator {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ld-accent);
    background: rgba(212, 168, 67, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Dice faces */
.liarsdice-die {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--ld-dice);
    width: 2.4rem;
    height: 2.4rem;
    background: var(--ld-surface-raised);
    border: 1px solid var(--ld-border);
    border-radius: 6px;
    line-height: 1;
    vertical-align: middle;
}

.liarsdice-my-die {
    font-size: 2.2rem;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 8px;
    animation: ld-dice-appear 0.3s ease-out;
}

/* My dice area (player view) */
.liarsdice-my-dice-area {
    margin-bottom: 1rem;
}

.liarsdice-my-dice {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.liarsdice-dice-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ld-text-muted);
    width: 100%;
    margin-bottom: 0.25rem;
}

/* Bid display */
.liarsdice-bid-area {
    text-align: center;
    margin-bottom: 0.75rem;
}

.liarsdice-current-bid {
    padding: 0.75rem;
}

.liarsdice-bid-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ld-text-muted);
    margin-bottom: 0.25rem;
}

.liarsdice-bid-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ld-accent);
    animation: ld-bid-pop 0.3s ease-out;
}

.liarsdice-no-bid {
    text-align: center;
    padding: 1rem;
    color: var(--ld-text-muted);
    font-size: 0.9rem;
    animation: ld-pulse-opacity 2s ease-in-out infinite;
}

/* Status area (player view) */
.liarsdice-status-area {
    text-align: center;
    margin-bottom: 0.75rem;
}

.liarsdice-turn-info {
    font-size: 0.85rem;
    color: var(--ld-text-muted);
    margin-top: 0.35rem;
}

.liarsdice-player-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.liarsdice-count-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ld-text-muted);
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

/* Bid form (player view) */
.liarsdice-your-turn-banner {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #181825;
    background: var(--ld-accent);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 0.75rem;
    animation: ld-phase-enter 0.4s ease-out;
}

.liarsdice-bid-hint {
    font-size: 0.8rem;
    color: var(--ld-text-muted);
    text-align: center;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.liarsdice-bid-form {
    background: var(--ld-surface);
    border: 2px solid var(--ld-accent);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 0 16px rgba(212, 168, 67, 0.12);
}

.liarsdice-bid-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.liarsdice-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ld-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.liarsdice-qty-select,
.liarsdice-face-select {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    background: var(--ld-surface-raised);
    color: var(--ld-text);
    border: 1px solid var(--ld-border);
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    color-scheme: dark;
    cursor: pointer;
}

.liarsdice-qty-select:focus,
.liarsdice-face-select:focus {
    border-color: var(--ld-accent);
}

/* Buttons */
.liarsdice-bid-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.liarsdice-bid-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--ld-accent);
    color: #181825;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.liarsdice-bid-btn:hover {
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.4);
    opacity: 0.9;
}

.liarsdice-bid-btn:active {
    transform: scale(0.97);
}

.liarsdice-bid-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.liarsdice-liar-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--ld-danger);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.liarsdice-liar-btn:hover {
    box-shadow: 0 0 16px rgba(224, 80, 80, 0.5);
    opacity: 0.9;
}

.liarsdice-liar-btn:active {
    transform: scale(0.96);
}

.liarsdice-liar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Challenge result */
.liarsdice-challenge-info {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: ld-challenge-reveal 0.5s ease-out;
}

.liarsdice-challenge-caller {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ld-danger);
    margin-bottom: 0.5rem;
}

.liarsdice-challenge-bid {
    font-size: 0.9rem;
    color: var(--ld-text-muted);
    margin-bottom: 0.25rem;
}

.liarsdice-challenge-actual {
    font-size: 0.9rem;
    color: var(--ld-text-muted);
    margin-bottom: 0.5rem;
}

.liarsdice-challenge-verdict {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    animation: ld-verdict-slam 0.4s ease-out 0.3s both;
}

.liarsdice-challenge-verdict-lie {
    color: var(--ld-danger);
}

.liarsdice-challenge-verdict-true {
    color: var(--ld-success);
}

.liarsdice-challenge-winner {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ld-accent);
}

/* All dice reveal */
.liarsdice-all-dice {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.liarsdice-player-dice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    border-radius: 8px;
    animation: ld-dice-appear 0.3s ease-out;
}

.liarsdice-dice-owner {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ld-text-muted);
    min-width: 5rem;
}

/* Game over */
.liarsdice-game-over {
    text-align: center;
    padding: 2rem;
}

.liarsdice-winner {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ld-accent);
    animation: ld-winner-glow 2s ease-in-out infinite;
}

/* Waiting / spectating / eliminated */
.liarsdice-waiting,
.liarsdice-spectating {
    text-align: center;
    padding: 1.25rem;
    color: var(--ld-text-muted);
    font-size: 0.9rem;
    animation: ld-pulse-opacity 2s ease-in-out infinite;
}

.liarsdice-eliminated-msg {
    text-align: center;
    padding: 1.25rem;
    color: var(--ld-danger);
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
}

/* Rolling animation */
.liarsdice-rolling .liarsdice-die,
.liarsdice-rolling .liarsdice-my-die {
    animation: ld-dice-roll 0.6s ease-in-out;
}

/* Keyframe animations */
@keyframes ld-phase-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ld-bid-pop {
    0% { transform: scale(1.3); opacity: 0.6; }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ld-dice-roll {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-12deg) scale(1.1); }
    50% { transform: rotate(8deg) scale(0.95); }
    75% { transform: rotate(-4deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes ld-dice-appear {
    from { opacity: 0; transform: scale(0.7) rotate(-10deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes ld-challenge-reveal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ld-verdict-slam {
    0% { transform: scale(2); opacity: 0; }
    60% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ld-winner-glow {
    0%, 100% { text-shadow: 0 0 8px rgba(212, 168, 67, 0.3); }
    50% { text-shadow: 0 0 20px rgba(212, 168, 67, 0.6); }
}

@keyframes ld-pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .liarsdice-host,
    .liarsdice-player {
        padding: 0.75rem;
    }

    .liarsdice-player-row {
        padding: 0.5rem 0.65rem;
        gap: 0.5rem;
    }

    .liarsdice-player-name {
        font-size: 0.8rem;
    }

    .liarsdice-my-die {
        font-size: 1.8rem;
        width: 2.4rem;
        height: 2.4rem;
    }

    .liarsdice-die {
        font-size: 1.4rem;
        width: 2rem;
        height: 2rem;
    }

    .liarsdice-bid-buttons {
        flex-direction: column;
    }

    .liarsdice-bid-btn,
    .liarsdice-liar-btn {
        width: 100%;
        text-align: center;
    }

    .liarsdice-bid-controls {
        flex-direction: column;
    }

    .liarsdice-winner {
        font-size: 1.4rem;
    }

    .liarsdice-challenge-verdict {
        font-size: 1.1rem;
    }
}


/* ── Mind Meld game ───────────────────────────────────── */

.mindmeld-host,
.mindmeld-player {
    --mm-bg: #0f1a1e;
    --mm-surface: #162228;
    --mm-surface-raised: #1e2e36;
    --mm-border: #264050;
    --mm-text: #d8ece8;
    --mm-text-muted: #6a9090;
    --mm-accent: #4ecdc4;
    --mm-match: #4ecdc4;
    --mm-no-match: #e06060;

    background: var(--mm-bg);
    color: var(--mm-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.mindmeld-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mm-text-muted);
    margin-bottom: 0.5rem;
}

.mindmeld-prompt-display {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--mm-accent);
    padding: 0.75rem;
    margin-bottom: 1rem;
    animation: mm-phase-enter 0.4s ease-out;
}

.mindmeld-status {
    text-align: center;
    padding: 1rem;
    color: var(--mm-text-muted);
    font-size: 0.95rem;
}

.mindmeld-counter {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mm-accent);
    margin-bottom: 0.5rem;
}

.mindmeld-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--mm-accent);
    margin-top: 0.5rem;
}

/* Input form */
.mindmeld-input-form {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.mindmeld-word-input {
    width: 100%;
    max-width: 20rem;
    padding: 0.7rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 1px solid var(--mm-border);
    border-radius: 10px;
    background: var(--mm-surface-raised);
    color: var(--mm-text);
    outline: none;
    font-family: inherit;
    color-scheme: dark;
    text-align: center;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.mindmeld-word-input:focus {
    border-color: var(--mm-accent);
}

.mindmeld-submit-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--mm-accent);
    color: #0f1a1e;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.mindmeld-submit-btn:hover {
    box-shadow: 0 0 12px rgba(78, 205, 196, 0.4);
    opacity: 0.9;
}

.mindmeld-submit-btn:active {
    transform: scale(0.97);
}

.mindmeld-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.mindmeld-submitted-msg {
    color: var(--mm-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mindmeld-my-word {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--mm-text);
    padding: 0.5rem;
    background: var(--mm-surface);
    border-radius: 8px;
    display: inline-block;
}

/* Word reveal */
.mindmeld-reveal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.mindmeld-word-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    min-width: 7rem;
    text-align: center;
    animation: mm-word-reveal 0.4s ease-out;
}

.mindmeld-word-match {
    background: rgba(78, 205, 196, 0.12);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.mindmeld-word-no-match {
    background: rgba(224, 96, 96, 0.1);
    border: 1px solid rgba(224, 96, 96, 0.2);
}

.mindmeld-word-mine {
    box-shadow: 0 0 0 2px var(--mm-accent);
}

.mindmeld-word-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mm-text-muted);
}

.mindmeld-word-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.mindmeld-word-match .mindmeld-word-text {
    color: var(--mm-match);
}

.mindmeld-word-no-match .mindmeld-word-text {
    color: var(--mm-no-match);
}

/* Scoreboard container spacing */
.mindmeld-scoreboard-container {
    margin-top: 1rem;
}

/* Animations */
@keyframes mm-phase-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mm-word-reveal {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .mindmeld-host,
    .mindmeld-player {
        padding: 0.75rem;
    }

    .mindmeld-prompt-display {
        font-size: 1.1rem;
    }

    .mindmeld-word-entry {
        min-width: 5rem;
        padding: 0.5rem 0.75rem;
    }

    .mindmeld-timer {
        font-size: 1.4rem;
    }
}


/* ── Caption This game ────────────────────────────────── */

.captionthis-host,
.captionthis-player {
    --ct-bg: #1a1220;
    --ct-surface: #241a2e;
    --ct-surface-raised: #302440;
    --ct-border: #3e3058;
    --ct-text: #e8e0f0;
    --ct-text-muted: #8a78a0;
    --ct-accent: #c474e0;

    background: var(--ct-bg);
    color: var(--ct-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.captionthis-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ct-text-muted);
    margin-bottom: 0.5rem;
}

.captionthis-prompt-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ct-accent);
    padding: 0.75rem;
    margin-bottom: 1rem;
    animation: ct-phase-enter 0.4s ease-out;
}

.captionthis-status {
    text-align: center;
    padding: 1rem;
    color: var(--ct-text-muted);
}

.captionthis-counter,
.captionthis-vote-status {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ct-accent);
    margin-bottom: 0.5rem;
}

.captionthis-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ct-accent);
    text-align: center;
    margin-top: 0.5rem;
}

.captionthis-submitted-msg {
    color: var(--ct-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.captionthis-my-caption {
    font-size: 1rem;
    font-style: italic;
    color: var(--ct-text);
    padding: 0.5rem;
    background: var(--ct-surface);
    border-radius: 8px;
    display: inline-block;
}

/* Input form */
.captionthis-input-form {
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.captionthis-caption-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    background: var(--ct-surface-raised);
    color: var(--ct-text);
    outline: none;
    font-family: inherit;
    color-scheme: dark;
    resize: vertical;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.captionthis-caption-input:focus {
    border-color: var(--ct-accent);
}

.captionthis-submit-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--ct-accent);
    color: #1a1220;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.captionthis-submit-btn:hover {
    box-shadow: 0 0 12px rgba(196, 116, 224, 0.4);
    opacity: 0.9;
}

.captionthis-submit-btn:active { transform: scale(0.97); }
.captionthis-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Vote list */
.captionthis-vote-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.captionthis-vote-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    animation: ct-caption-enter 0.3s ease-out;
}

.captionthis-own-caption {
    opacity: 0.5;
}

.captionthis-own-label {
    font-size: 0.7rem;
    color: var(--ct-text-muted);
    font-style: italic;
}

.captionthis-vote-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    background: var(--ct-accent);
    color: #1a1220;
    white-space: nowrap;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.captionthis-vote-btn:hover { box-shadow: 0 0 10px rgba(196, 116, 224, 0.4); opacity: 0.9; }
.captionthis-vote-btn:active { transform: scale(0.97); }
.captionthis-vote-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Caption cards (reveal/scoring) */
.captionthis-captions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.captionthis-caption-card {
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    animation: ct-caption-enter 0.3s ease-out;
}

.captionthis-caption-text {
    font-size: 1rem;
    font-weight: 600;
    display: block;
}

.captionthis-caption-author {
    font-size: 0.75rem;
    color: var(--ct-text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.captionthis-vote-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ct-accent);
    display: block;
    margin-top: 0.25rem;
}

.captionthis-scoreboard-container { margin-top: 1rem; }

@keyframes ct-phase-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ct-caption-enter {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 600px) {
    .captionthis-host, .captionthis-player { padding: 0.75rem; }
    .captionthis-prompt-display { font-size: 1rem; }
    .captionthis-timer { font-size: 1.4rem; }
}


/* ── Ranking Game ─────────────────────────────────────── */

.rankinggame-host,
.rankinggame-player {
    --rg-bg: #1a1610;
    --rg-surface: #242018;
    --rg-surface-raised: #302a1e;
    --rg-border: #4a3e28;
    --rg-text: #ece4d4;
    --rg-text-muted: #9a8a6a;
    --rg-accent: #e0a030;
    --rg-exact: #50b050;
    --rg-close: #d4a843;
    --rg-off: #e06060;

    background: var(--rg-bg);
    color: var(--rg-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.rankinggame-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rg-text-muted);
    margin-bottom: 0.5rem;
}

.rankinggame-category-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rg-accent);
    padding: 0.75rem;
    margin-bottom: 1rem;
    animation: rg-phase-enter 0.4s ease-out;
}

.rankinggame-status {
    text-align: center;
    padding: 1rem;
    color: var(--rg-text-muted);
}

.rankinggame-counter {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rg-accent);
    margin-bottom: 0.5rem;
}

.rankinggame-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--rg-accent);
    text-align: center;
    margin-top: 0.5rem;
}

.rankinggame-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.rankinggame-item {
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    text-align: center;
    font-weight: 600;
}

/* Ranking form */
.rankinggame-rank-form {
    text-align: center;
}

.rankinggame-instruction {
    font-size: 0.8rem;
    color: var(--rg-text-muted);
    margin-bottom: 0.75rem;
}

.rankinggame-rank-items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.rankinggame-rank-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    border-radius: 8px;
    color: var(--rg-text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: left;
}

.rankinggame-rank-btn:hover {
    border-color: var(--rg-accent);
}

.rankinggame-rank-btn.rankinggame-selected {
    border-color: var(--rg-accent);
    background: rgba(224, 160, 48, 0.1);
}

.rankinggame-rank-badge {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--rg-accent);
    min-width: 1.5rem;
}

.rankinggame-rank-label {
    flex: 1;
}

.rankinggame-rank-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.rankinggame-reset-btn,
.rankinggame-submit-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.rankinggame-submit-btn {
    background: var(--rg-accent);
    color: #1a1610;
}

.rankinggame-submit-btn:hover { box-shadow: 0 0 12px rgba(224, 160, 48, 0.4); opacity: 0.9; }
.rankinggame-submit-btn:active { transform: scale(0.97); }
.rankinggame-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.rankinggame-reset-btn {
    background: transparent;
    border: 1px solid var(--rg-border);
    color: var(--rg-text-muted);
}

.rankinggame-reset-btn:hover { border-color: var(--rg-text-muted); color: var(--rg-text); }
.rankinggame-reset-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.rankinggame-submitted-msg {
    text-align: center;
    padding: 1rem;
    color: var(--rg-accent);
    font-weight: 600;
}

/* Reveal */
.rankinggame-reveal { margin-top: 0.5rem; }

.rankinggame-consensus-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rg-text-muted);
    margin-bottom: 0.5rem;
}

.rankinggame-consensus {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.rankinggame-consensus-item {
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    animation: rg-item-reveal 0.3s ease-out;
}

.rankinggame-rank {
    font-weight: 800;
    color: var(--rg-accent);
    margin-right: 0.5rem;
}

.rankinggame-player-rankings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rankinggame-player-ranking {
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}

.rankinggame-player-ranking.rankinggame-mine {
    border-color: var(--rg-accent);
    box-shadow: 0 0 8px rgba(224, 160, 48, 0.15);
}

.rankinggame-player-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--rg-text-muted);
    margin-bottom: 0.3rem;
}

.rankinggame-player-item {
    font-size: 0.85rem;
    padding: 0.15rem 0;
}

.rankinggame-player-item.rankinggame-exact { color: var(--rg-exact); }
.rankinggame-player-item.rankinggame-close { color: var(--rg-close); }
.rankinggame-player-item.rankinggame-off { color: var(--rg-off); }

.rankinggame-scoreboard-container { margin-top: 1rem; }

@keyframes rg-phase-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rg-item-reveal {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 600px) {
    .rankinggame-host, .rankinggame-player { padding: 0.75rem; }
    .rankinggame-category-display { font-size: 1rem; }
    .rankinggame-rank-actions { flex-direction: column; }
    .rankinggame-reset-btn, .rankinggame-submit-btn { width: 100%; }
    .rankinggame-timer { font-size: 1.4rem; }
}


/* ── Word Scramble game ───────────────────────────────── */

.wordscramble-host,
.wordscramble-player {
    --ws-bg: #101a12;
    --ws-surface: #18241a;
    --ws-surface-raised: #223026;
    --ws-border: #304830;
    --ws-text: #dce8dc;
    --ws-text-muted: #6a906a;
    --ws-accent: #60d060;
    --ws-wrong: #e06060;

    background: var(--ws-bg);
    color: var(--ws-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.wordscramble-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ws-text-muted);
    margin-bottom: 0.5rem;
}

.wordscramble-scrambled {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--ws-accent);
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    animation: ws-scramble-enter 0.4s ease-out;
}

.wordscramble-answer {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ws-text);
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.wordscramble-status {
    text-align: center;
    padding: 1rem;
    color: var(--ws-text-muted);
}

.wordscramble-counter {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ws-accent);
    margin-bottom: 0.5rem;
}

.wordscramble-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ws-accent);
    text-align: center;
    margin-top: 0.5rem;
}

.wordscramble-correct-msg {
    color: var(--ws-accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Input */
.wordscramble-input-form {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.wordscramble-guess-input {
    width: 100%;
    max-width: 16rem;
    padding: 0.7rem 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.08em;
    border: 1px solid var(--ws-border);
    border-radius: 10px;
    background: var(--ws-surface-raised);
    color: var(--ws-text);
    outline: none;
    color-scheme: dark;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.wordscramble-guess-input:focus { border-color: var(--ws-accent); }

.wordscramble-submit-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--ws-accent);
    color: #101a12;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.wordscramble-submit-btn:hover { box-shadow: 0 0 12px rgba(96, 208, 96, 0.4); opacity: 0.9; }
.wordscramble-submit-btn:active { transform: scale(0.97); }
.wordscramble-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.wordscramble-wrong-msg {
    color: var(--ws-wrong);
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Results */
.wordscramble-results {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wordscramble-result-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    animation: ws-result-enter 0.3s ease-out;
}

.wordscramble-result-entry.wordscramble-result-mine {
    border-color: var(--ws-accent);
    box-shadow: 0 0 8px rgba(96, 208, 96, 0.15);
}

.wordscramble-result-rank { font-weight: 800; color: var(--ws-accent); min-width: 1.5rem; }
.wordscramble-result-name { flex: 1; font-weight: 600; }
.wordscramble-result-points { font-weight: 700; color: var(--ws-accent); }
.wordscramble-no-correct { text-align: center; padding: 1rem; color: var(--ws-text-muted); }
.wordscramble-scoreboard-container { margin-top: 1rem; }

@keyframes ws-scramble-enter {
    from { opacity: 0; transform: scale(0.8) rotate(-3deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes ws-result-enter {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 600px) {
    .wordscramble-host, .wordscramble-player { padding: 0.75rem; }
    .wordscramble-scrambled { font-size: 1.5rem; }
    .wordscramble-timer { font-size: 1.4rem; }
}


/* ── Tap Race game ────────────────────────────────────── */

.taprace-host,
.taprace-player {
    --tr-bg: #0c1020;
    --tr-surface: #141830;
    --tr-surface-raised: #1c2040;
    --tr-border: #283060;
    --tr-text: #d4d8f0;
    --tr-text-muted: #6a70a0;
    --tr-accent: #4090ff;
    --tr-go: #00e060;
    --tr-danger: #ff4444;

    background: var(--tr-bg);
    color: var(--tr-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.taprace-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tr-text-muted);
    margin-bottom: 0.75rem;
}

/* Countdown */
.taprace-countdown {
    text-align: center;
    padding: 2rem;
}

.taprace-countdown-text {
    font-size: 1rem;
    color: var(--tr-text-muted);
    margin-bottom: 0.5rem;
}

.taprace-countdown-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--tr-accent);
    animation: tr-pulse 0.5s ease-in-out;
}

/* Wait */
.taprace-wait, .taprace-wait-signal {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tr-text-muted);
    padding: 1.5rem;
}

.taprace-wait-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tr-text-muted);
    animation: tr-pulse-opacity 1.5s ease-in-out infinite;
}

/* Go */
.taprace-go {
    text-align: center;
    padding: 1.5rem;
}

.taprace-go-text, .taprace-go-signal {
    font-size: 3rem;
    font-weight: 800;
    color: var(--tr-go) !important;
    animation: tr-go-flash 0.3s ease-out;
}

.taprace-tap-count {
    font-size: 1rem;
    color: var(--tr-text-muted);
    margin-top: 0.5rem;
}

/* Tap button */
.taprace-tap-area {
    text-align: center;
    padding: 1rem;
}

.taprace-tap-btn {
    width: 100%;
    max-width: 16rem;
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
    font-weight: 800;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-family: inherit;
    background: var(--tr-accent);
    color: #fff;
    transition: box-shadow 0.1s, transform 0.05s;
    margin: 0.75rem auto;
    display: block;
}

.taprace-tap-btn:active { transform: scale(0.95); }
.taprace-tap-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.taprace-tap-btn-wait {
    background: var(--tr-surface-raised) !important;
    color: var(--tr-text-muted) !important;
    border: 2px solid var(--tr-border);
}

.taprace-tapped {
    text-align: center;
    padding: 1.5rem;
}

.taprace-tapped-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tr-accent);
}

.taprace-tapped-sub {
    font-size: 0.85rem;
    color: var(--tr-text-muted);
    margin-top: 0.25rem;
}

/* Fakeout */
.taprace-fakeout-reveal {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--tr-danger) !important;
    animation: tr-shake 0.5s ease-out;
    margin-bottom: 0.5rem;
}

.taprace-fakeout-sub {
    text-align: center;
    font-size: 0.9rem;
    color: var(--tr-text-muted);
    margin-bottom: 1rem;
}

/* Results */
.taprace-round-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tr-text-muted);
    margin-bottom: 0.5rem;
}

.taprace-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.taprace-result-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    animation: tr-result-enter 0.3s ease-out;
}

.taprace-result-entry.taprace-result-mine {
    border-color: var(--tr-accent);
    box-shadow: 0 0 8px rgba(64, 144, 255, 0.15);
}

.taprace-result-rank { font-weight: 800; color: var(--tr-accent); min-width: 1.5rem; }
.taprace-result-name { flex: 1; font-weight: 600; }
.taprace-result-time { color: var(--tr-text-muted); font-weight: 600; }
.taprace-result-change { font-weight: 700; color: var(--tr-accent); }
.taprace-scoreboard-container { margin-top: 1rem; }

@keyframes tr-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes tr-pulse-opacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes tr-go-flash { from { transform: scale(1.5); opacity: 0.5; } to { transform: scale(1); opacity: 1; } }
@keyframes tr-shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(3px)} }
@keyframes tr-result-enter { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 600px) {
    .taprace-host, .taprace-player { padding: 0.75rem; }
    .taprace-countdown-number { font-size: 2.2rem; }
    .taprace-go-text, .taprace-go-signal { font-size: 2.2rem !important; }
    .taprace-tap-btn { padding: 1.2rem 1.5rem; font-size: 1.1rem; }
}

/* ====================================================================
   AUCTION BLUFF — Rich burgundy auction-house theme
   ==================================================================== */
.auctionbluff-host, .auctionbluff-player {
    --ab-bg: #1a1018;
    --ab-surface: #241820;
    --ab-raised: #2e2030;
    --ab-text: #e8e0d8;
    --ab-text-muted: #8a7888;
    --ab-accent: #d4a040;
    --ab-coins: #f0c848;
    --ab-winner: #50c050;

    background: var(--ab-bg);
    color: var(--ab-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.auctionbluff-round-info {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: var(--ab-text-muted);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(212, 160, 64, 0.15);
    margin-bottom: 1rem;
}

.auctionbluff-teaser {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ab-accent);
    padding: 1rem;
    background: var(--ab-surface);
    border-radius: 12px;
    border: 1px solid rgba(212, 160, 64, 0.2);
    margin-bottom: 1rem;
    animation: ab-item-enter 0.4s ease-out;
}

.auctionbluff-status {
    text-align: center;
    padding: 0.75rem;
    color: var(--ab-text-muted);
    animation: ab-pulse-opacity 2s ease-in-out infinite;
}

.auctionbluff-counter {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ab-accent);
    margin: 0.5rem 0;
}

.auctionbluff-timer {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ab-coins);
    margin-top: 0.5rem;
}

.auctionbluff-coins {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ab-coins);
    margin: 0.5rem 0;
}

.auctionbluff-winner-reveal {
    text-align: center;
    padding: 1rem;
    background: var(--ab-surface);
    border-radius: 12px;
    border: 1px solid rgba(212, 160, 64, 0.3);
    animation: ab-winner-enter 0.5s ease-out;
}

.auctionbluff-winner-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ab-winner);
    margin-bottom: 0.25rem;
}

.auctionbluff-winner-bid {
    font-size: 1rem;
    color: var(--ab-coins);
}

.auctionbluff-item-revealed {
    text-align: center;
    padding: 1.25rem;
    background: var(--ab-surface);
    border-radius: 12px;
    border: 2px solid var(--ab-accent);
    margin-bottom: 1rem;
    animation: ab-item-enter 0.4s ease-out;
}

.auctionbluff-item-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ab-text);
    margin-bottom: 0.25rem;
}

.auctionbluff-item-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ab-accent);
}

.auctionbluff-value-reveal {
    text-align: center;
    padding: 0.75rem;
    color: var(--ab-text-muted);
}

.auctionbluff-bid-form {
    text-align: center;
    padding: 1rem;
    background: var(--ab-surface);
    border-radius: 12px;
    border: 1px solid rgba(212, 160, 64, 0.2);
}

.auctionbluff-bid-input {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0.75rem auto;
    padding: 0.6rem 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    border: 2px solid rgba(212, 160, 64, 0.3);
    background: var(--ab-bg);
    color: var(--ab-text);
    color-scheme: dark;
}

.auctionbluff-bid-input:focus {
    outline: none;
    border-color: var(--ab-accent);
    box-shadow: 0 0 8px rgba(212, 160, 64, 0.3);
}

.auctionbluff-submit-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ab-bg);
    background: var(--ab-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.auctionbluff-submit-btn:hover:not(:disabled) {
    background: #e0b050;
    transform: translateY(-1px);
}

.auctionbluff-submit-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.auctionbluff-submitted-msg {
    color: var(--ab-winner);
    font-weight: 600;
}

.auctionbluff-my-bid {
    color: var(--ab-coins);
    font-weight: 700;
    margin-top: 0.25rem;
}

.auctionbluff-scoreboard-container { margin-top: 1rem; }

@keyframes ab-item-enter { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes ab-winner-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ab-pulse-opacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (max-width: 600px) {
    .auctionbluff-host, .auctionbluff-player { padding: 0.75rem; }
    .auctionbluff-teaser { font-size: 1.3rem; padding: 0.75rem; }
}

/* ====================================================================
   WAVELENGTH — Spectrum / psychic deep-purple theme
   ==================================================================== */
.wavelength-host, .wavelength-player {
    --wl-bg: #14101e;
    --wl-surface: #1e1830;
    --wl-raised: #282240;
    --wl-text: #e0dce8;
    --wl-text-muted: #7a7090;
    --wl-accent: #c060e0;
    --wl-target: #40d880;
    --wl-guess: #f0c040;

    background: var(--wl-bg);
    color: var(--wl-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.wavelength-round-info {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: var(--wl-text-muted);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(192, 96, 224, 0.15);
    margin-bottom: 0.75rem;
}

.wavelength-psychic-info {
    text-align: center;
    margin-bottom: 0.75rem;
}

.wavelength-psychic-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--wl-text-muted);
}

.wavelength-psychic-name {
    font-weight: 700;
    color: var(--wl-accent);
    font-size: 1.1rem;
}

.wavelength-spectrum-container {
    margin: 0.75rem 0;
}

.wavelength-spectrum {
    border: 2px solid rgba(192, 96, 224, 0.2) !important;
    box-shadow: 0 2px 12px rgba(192, 96, 224, 0.1);
}

.wavelength-clue-display {
    text-align: center;
    padding: 0.75rem;
    background: var(--wl-surface);
    border-radius: 10px;
    margin: 0.75rem 0;
    border: 1px solid rgba(192, 96, 224, 0.2);
}

.wavelength-clue-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--wl-text-muted);
}

.wavelength-clue-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--wl-accent);
    animation: wl-clue-enter 0.4s ease-out;
}

.wavelength-status {
    text-align: center;
    padding: 0.75rem;
    color: var(--wl-text-muted);
}

.wavelength-waiting {
    animation: wl-pulse-opacity 2s ease-in-out infinite;
}

.wavelength-counter {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wl-accent);
    margin-top: 0.25rem;
}

.wavelength-timer {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--wl-guess);
    margin-top: 0.5rem;
}

.wavelength-guess-prompt {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wl-text);
}

.wavelength-submitted-msg {
    color: var(--wl-target);
    font-weight: 600;
}

.wavelength-clue-form, .wavelength-guess-form {
    text-align: center;
    padding: 1rem;
    background: var(--wl-surface);
    border-radius: 12px;
    border: 1px solid rgba(192, 96, 224, 0.2);
}

.wavelength-clue-prompt, .wavelength-guess-prompt {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.wavelength-clue-input {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0.5rem auto;
    padding: 0.5rem 0.8rem;
    font-size: 1.1rem;
    text-align: center;
    border-radius: 8px;
    border: 2px solid rgba(192, 96, 224, 0.3);
    background: var(--wl-bg);
    color: var(--wl-text);
    color-scheme: dark;
}

.wavelength-clue-input:focus {
    outline: none;
    border-color: var(--wl-accent);
    box-shadow: 0 0 8px rgba(192, 96, 224, 0.3);
}

.wavelength-clue-submit-btn, .wavelength-guess-submit-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--wl-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.wavelength-clue-submit-btn:hover:not(:disabled), .wavelength-guess-submit-btn:hover:not(:disabled) {
    background: #d070f0;
    transform: translateY(-1px);
}

.wavelength-clue-submit-btn:disabled, .wavelength-guess-submit-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.wavelength-slider-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.wavelength-slider-label-left, .wavelength-slider-label-right {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wl-text-muted);
    min-width: 3rem;
    flex-shrink: 0;
}

.wavelength-slider-label-left { text-align: right; }
.wavelength-slider-label-right { text-align: left; }

.wavelength-guess-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #3498db, #e74c3c);
    outline: none;
}

.wavelength-guess-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--wl-accent);
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(192, 96, 224, 0.5);
}

.wavelength-slider-value {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--wl-accent);
    margin-bottom: 0.5rem;
}

.wavelength-reveal-result {
    text-align: center;
    padding: 1rem;
    animation: wl-reveal-enter 0.5s ease-out;
}

.wavelength-points {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--wl-target);
}

.wavelength-scoreboard-container { margin-top: 1rem; }

@keyframes wl-clue-enter { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@keyframes wl-pulse-opacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes wl-reveal-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
    .wavelength-host, .wavelength-player { padding: 0.75rem; }
    .wavelength-clue-text { font-size: 1.2rem; }
    .wavelength-slider-label-left, .wavelength-slider-label-right { font-size: 0.7rem; min-width: 2rem; }
}

/* ====================================================================
   COUP LITE — Dark crimson political intrigue theme
   ==================================================================== */
.couplite-host, .couplite-player {
    --cl-bg: #1a0e0e;
    --cl-surface: #241414;
    --cl-raised: #301c1c;
    --cl-text: #e8dcd8;
    --cl-text-muted: #8a7070;
    --cl-accent: #d04040;
    --cl-coins: #f0c040;
    --cl-success: #50b050;

    background: var(--cl-bg);
    color: var(--cl-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.couplite-title {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cl-accent);
    margin-bottom: 0.75rem;
}

.couplite-phase-info {
    text-align: center;
    margin-bottom: 0.75rem;
}

.couplite-phase-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cl-accent);
    animation: cl-phase-enter 0.3s ease-out;
}

.couplite-players-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.couplite-player-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--cl-surface);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    flex-wrap: wrap;
}

.couplite-player-row.couplite-current-turn {
    border-left-color: var(--cl-accent);
    background: var(--cl-raised);
    box-shadow: inset 0 0 12px rgba(208, 64, 64, 0.08);
}

.couplite-player-row.couplite-eliminated {
    opacity: 0.4;
    text-decoration: line-through;
}

.couplite-player-name { font-weight: 600; flex-shrink: 0; }
.couplite-player-cards { color: var(--cl-text-muted); font-size: 0.9rem; }
.couplite-player-coins { color: var(--cl-coins); font-weight: 600; font-size: 0.9rem; }
.couplite-player-status { color: var(--cl-accent); font-weight: 600; font-size: 0.85rem; }
.couplite-turn-indicator { color: var(--cl-accent); font-weight: 700; font-size: 0.85rem; }

.couplite-my-cards {
    text-align: center;
    padding: 0.75rem;
    background: var(--cl-surface);
    border-radius: 10px;
    border: 1px solid rgba(208, 64, 64, 0.2);
    margin-bottom: 0.75rem;
}

.couplite-cards-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--cl-text-muted);
}

.couplite-card {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    margin: 0.15rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 6px;
    background: var(--cl-raised);
    border: 1px solid rgba(208, 64, 64, 0.3);
}

.couplite-card-duke { color: #c060e0; border-color: rgba(192, 96, 224, 0.4); }
.couplite-card-captain { color: #4090ff; border-color: rgba(64, 144, 255, 0.4); }
.couplite-card-assassin { color: var(--cl-accent); border-color: rgba(208, 64, 64, 0.4); }
.couplite-card-ambassador { color: var(--cl-success); border-color: rgba(80, 176, 80, 0.4); }
.couplite-card-contessa { color: var(--cl-coins); border-color: rgba(240, 192, 64, 0.4); }

.couplite-my-coins {
    color: var(--cl-coins);
    font-weight: 700;
    font-size: 0.9rem;
}

.couplite-player-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.couplite-status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--cl-surface);
    border-radius: 6px;
    color: var(--cl-text-muted);
}

.couplite-status-badge.couplite-status-eliminated {
    opacity: 0.5;
    text-decoration: line-through;
}

.couplite-eliminated-msg {
    text-align: center;
    color: var(--cl-accent);
    font-weight: 700;
    padding: 0.75rem;
}

.couplite-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem;
    background: var(--cl-surface);
    border-radius: 10px;
    border: 1px solid rgba(208, 64, 64, 0.15);
}

.couplite-must-coup {
    text-align: center;
    font-weight: 700;
    color: var(--cl-accent);
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    animation: cl-phase-enter 0.3s ease-out;
}

.couplite-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(208, 64, 64, 0.3);
    border-radius: 8px;
    background: var(--cl-raised);
    color: var(--cl-text);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.couplite-btn:hover:not(:disabled) {
    background: var(--cl-accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(208, 64, 64, 0.25);
}

.couplite-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.couplite-btn-coup {
    background: var(--cl-accent);
    color: #fff;
    font-size: 1rem;
    border-color: var(--cl-accent);
}

.couplite-btn-assassinate { border-color: rgba(208, 64, 64, 0.5); }

.couplite-targeted-action {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.couplite-targeted-action .couplite-btn { flex: 1; }

.couplite-target-select {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(208, 64, 64, 0.3);
    background: var(--cl-bg);
    color: var(--cl-text);
    color-scheme: dark;
    min-width: 80px;
}

.couplite-action-claim, .couplite-challenge-window {
    text-align: center;
    padding: 0.75rem;
    background: var(--cl-surface);
    border-radius: 10px;
    border: 1px solid rgba(208, 64, 64, 0.2);
}

.couplite-claim-text {
    font-weight: 600;
    color: var(--cl-text);
    margin-bottom: 0.5rem;
}

.couplite-challenge-prompt {
    font-size: 0.85rem;
    color: var(--cl-text-muted);
    animation: cl-pulse-opacity 2s ease-in-out infinite;
}

.couplite-challenge-btn {
    margin-top: 0.75rem;
    padding: 0.6rem 2rem !important;
    font-size: 1.1rem !important;
    background: var(--cl-accent) !important;
    color: #fff !important;
    border-color: var(--cl-accent) !important;
    animation: cl-phase-enter 0.3s ease-out;
}

.couplite-challenge-btn:hover:not(:disabled) {
    box-shadow: 0 0 16px rgba(208, 64, 64, 0.4) !important;
}

.couplite-challenge-result, .couplite-action-result {
    text-align: center;
    padding: 0.75rem;
    background: var(--cl-surface);
    border-radius: 10px;
    animation: cl-result-enter 0.4s ease-out;
}

.couplite-verdict {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cl-accent);
    margin-top: 0.25rem;
}

.couplite-waiting {
    text-align: center;
    color: var(--cl-text-muted);
    padding: 0.5rem;
    animation: cl-pulse-opacity 2s ease-in-out infinite;
}

.couplite-lose-card-choice, .couplite-exchange-choice {
    text-align: center;
    padding: 0.75rem;
    background: var(--cl-surface);
    border-radius: 10px;
}

.couplite-lose-prompt, .couplite-exchange-prompt {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--cl-accent);
}

.couplite-selected {
    background: var(--cl-accent) !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(208, 64, 64, 0.3);
}

.couplite-exchange-confirm {
    margin-top: 0.5rem;
}

.couplite-game-over {
    text-align: center;
    padding: 1.5rem;
    animation: cl-result-enter 0.5s ease-out;
}

.couplite-winner {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--cl-coins);
    text-shadow: 0 0 20px rgba(240, 192, 64, 0.3);
    animation: cl-winner-glow 2s ease-in-out infinite;
}

@keyframes cl-phase-enter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cl-pulse-opacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes cl-result-enter { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes cl-winner-glow { 0%, 100% { text-shadow: 0 0 20px rgba(240, 192, 64, 0.3); } 50% { text-shadow: 0 0 30px rgba(240, 192, 64, 0.6); } }

@media (max-width: 600px) {
    .couplite-host, .couplite-player { padding: 0.75rem; }
    .couplite-targeted-action { flex-direction: column; }
    .couplite-target-select { width: 100%; min-width: auto; }
}

/* ====================================================================
   DRAWING TELEPHONE — Warm parchment / sketchbook theme
   ==================================================================== */
.drawingtelephone-host, .drawingtelephone-player {
    --dt-bg: #1a1810;
    --dt-surface: #24221a;
    --dt-raised: #2e2c22;
    --dt-text: #e8e4d8;
    --dt-text-muted: #8a8470;
    --dt-accent: #e0c040;
    --dt-prompt: #60c0e0;
    --dt-player-entry: #e0a060;

    background: var(--dt-bg);
    color: var(--dt-text);
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.drawingtelephone-step-info, .drawingtelephone-reveal-header {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dt-accent);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(224, 192, 64, 0.15);
    margin-bottom: 1rem;
}

.drawingtelephone-writing-status {
    text-align: center;
    padding: 1rem;
}

.drawingtelephone-status-text {
    color: var(--dt-text-muted);
    animation: dt-pulse-opacity 2s ease-in-out infinite;
}

.drawingtelephone-counter {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dt-accent);
    margin-top: 0.5rem;
}

.drawingtelephone-timer {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dt-accent);
    margin-top: 0.5rem;
}

.drawingtelephone-writing-area {
    padding: 0.75rem;
}

.drawingtelephone-prompt-label {
    text-align: center;
    font-weight: 700;
    color: var(--dt-accent);
    margin-bottom: 0.5rem;
}

.drawingtelephone-previous-text {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dt-prompt);
    padding: 0.75rem;
    background: var(--dt-surface);
    border-radius: 10px;
    border: 1px solid rgba(96, 192, 224, 0.2);
    margin-bottom: 0.75rem;
    animation: dt-entry-enter 0.4s ease-out;
}

.drawingtelephone-input-form {
    text-align: center;
}

.drawingtelephone-text-input {
    display: block;
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(224, 192, 64, 0.3);
    background: var(--dt-bg);
    color: var(--dt-text);
    color-scheme: dark;
    resize: vertical;
    font-family: inherit;
}

.drawingtelephone-text-input:focus {
    outline: none;
    border-color: var(--dt-accent);
    box-shadow: 0 0 8px rgba(224, 192, 64, 0.3);
}

.drawingtelephone-submit-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dt-bg);
    background: var(--dt-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.drawingtelephone-submit-btn:hover:not(:disabled) {
    background: #ecd050;
    transform: translateY(-1px);
}

.drawingtelephone-submit-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.drawingtelephone-submitted {
    text-align: center;
    padding: 1rem;
}

.drawingtelephone-submitted-msg {
    color: var(--dt-accent);
    font-weight: 600;
}

.drawingtelephone-chain {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drawingtelephone-chain-entry {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: var(--dt-surface);
    border-left: 3px solid var(--dt-text-muted);
    animation: dt-entry-enter 0.4s ease-out;
}

.drawingtelephone-chain-entry.drawingtelephone-entry-prompt {
    border-left-color: var(--dt-prompt);
    background: rgba(96, 192, 224, 0.06);
}

.drawingtelephone-chain-entry.drawingtelephone-entry-player {
    border-left-color: var(--dt-player-entry);
}

.drawingtelephone-entry-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dt-text-muted);
    margin-bottom: 0.2rem;
}

.drawingtelephone-entry-prompt .drawingtelephone-entry-label { color: var(--dt-prompt); }
.drawingtelephone-entry-player .drawingtelephone-entry-label { color: var(--dt-player-entry); }

.drawingtelephone-entry-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dt-text);
    line-height: 1.4;
}

.drawingtelephone-all-chains {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.drawingtelephone-chain-block {
    padding: 0.75rem;
    background: var(--dt-surface);
    border-radius: 12px;
    border: 1px solid rgba(224, 192, 64, 0.15);
}

.drawingtelephone-chain-title {
    text-align: center;
    font-weight: 700;
    color: var(--dt-accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.drawingtelephone-chain-block .drawingtelephone-chain-entry {
    margin-bottom: 0.35rem;
}

@keyframes dt-pulse-opacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes dt-entry-enter { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 600px) {
    .drawingtelephone-host, .drawingtelephone-player { padding: 0.75rem; }
    .drawingtelephone-previous-text { font-size: 1.1rem; }
    .drawingtelephone-entry-text { font-size: 1rem; }
}

/* ── Auth Pages (Login / Register) ── */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
}

.auth-card {
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    font-family: var(--arcade-font);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 8px rgba(0, 255, 240, 0.3);
}

.auth-subtitle {
    color: var(--arcade-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--arcade-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
    border: 1.5px solid var(--arcade-border);
    border-radius: 8px;
    background: var(--arcade-bg);
    color: var(--arcade-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--arcade-cyan);
    background: var(--arcade-bg);
    box-shadow: 0 0 10px rgba(0, 255, 240, 0.15);
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--arcade-muted);
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.auth-error {
    color: var(--arcade-magenta);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.auth-alt {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--arcade-muted);
}

.auth-alt a {
    color: var(--arcade-cyan);
    font-weight: 600;
    text-decoration: none;
}

.auth-alt a:hover {
    text-shadow: 0 0 8px rgba(0, 255, 240, 0.4);
}

/* ── Profile Page ── */
.profile-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--arcade-surface);
    color: var(--arcade-cyan);
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--arcade-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 240, 0.2);
}

.profile-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
}

.profile-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(179, 136, 255, 0.15);
    color: var(--arcade-purple);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(179, 136, 255, 0.2);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--arcade-cyan);
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--arcade-muted);
    margin-top: 0.25rem;
}

.stat-win .stat-value { color: var(--arcade-green); }
.stat-loss .stat-value { color: var(--arcade-magenta); }

.profile-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--arcade-muted);
    font-size: 1.05rem;
}

.profile-empty .btn-primary {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
}

.profile-history h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--arcade-text);
    margin-bottom: 0.75rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--arcade-surface);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--arcade-border);
}

.history-table th {
    text-align: left;
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--arcade-muted);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--arcade-border);
}

.history-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--arcade-border);
    color: var(--arcade-text);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.badge-win {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--arcade-green);
    background: rgba(0, 255, 65, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.badge-loss {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--arcade-magenta);
    background: rgba(255, 45, 149, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-shadow: 0 0 6px rgba(255, 45, 149, 0.3);
}

@media (max-width: 600px) {
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-table th:nth-child(5),
    .history-table td:nth-child(5) {
        display: none;
    }
}

/* ====================================================================
   ECHO — Simple warm amber theme
   ==================================================================== */

.echo-host, .echo-player {
    --echo-bg: #1a1610;
    --echo-surface: #24201a;
    --echo-border: #3e3828;
    --echo-text: #e8e0d0;
    --echo-text-muted: #8a8068;
    --echo-accent: #e0a840;

    background: var(--echo-bg);
    color: var(--echo-text);
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 200px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    text-align: center;
}

.echo-host h3, .echo-player h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--echo-accent);
    margin-bottom: 0.75rem;
}

.echo-host p, .echo-player p {
    color: var(--echo-text-muted);
    margin-bottom: 0.5rem;
}

.echo-host .btn-start,
.echo-player .btn-join {
    max-width: 280px;
    margin: 0.75rem auto 0;
    display: block;
    min-height: 44px;
}

.echo-player .form-input {
    max-width: 300px;
    margin: 0 auto;
    min-height: 44px;
    font-size: 1rem;
}

.echo-host ul, .echo-player ul {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.echo-host .player-item,
.echo-player .player-item {
    background: var(--echo-surface);
    border: 1px solid var(--echo-border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: echo-item-enter 0.3s ease-out;
}

@keyframes echo-item-enter {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 600px) {
    .echo-host, .echo-player { padding: 0.75rem; border-radius: 12px; }
}

/* ====================================================================
   HOT TAKES — Bold red/orange debate theme
   ==================================================================== */

.hottakes-host, .hottakes-player {
    --ht-bg: #1a1012;
    --ht-surface: #241820;
    --ht-border: #3e2830;
    --ht-text: #e8e0e0;
    --ht-text-muted: #8a7078;
    --ht-accent: #e05040;
    --ht-agree: #50b860;
    --ht-disagree: #e05040;

    background: var(--ht-bg);
    color: var(--ht-text);
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 200px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.hottakes-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ht-text-muted);
    margin-bottom: 0.5rem;
}

.hottakes-prompt-display {
    text-align: center;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.hottakes-prompt-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ht-accent);
    animation: ht-prompt-enter 0.4s ease-out;
}

.hottakes-status {
    text-align: center;
    padding: 1rem;
    color: var(--ht-text-muted);
}

.hottakes-counter {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ht-accent);
    margin-bottom: 0.5rem;
}

.hottakes-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ht-text);
    margin-bottom: 0.5rem;
}

.hottakes-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ht-accent);
    text-align: center;
    margin-top: 0.5rem;
}

.hottakes-submitted-msg {
    color: var(--ht-agree);
    font-weight: 600;
}

/* Vote & guess buttons */
.hottakes-vote-buttons,
.hottakes-guess-section {
    text-align: center;
    padding: 0.5rem;
}

.hottakes-guess-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ht-text);
    margin-bottom: 0.75rem;
}

.hottakes-guess-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hottakes-vote-btn,
.hottakes-guess-btn {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    min-height: 48px;
    min-width: 120px;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.hottakes-agree-btn,
.hottakes-guess-agree-btn {
    background: var(--ht-agree);
    color: #0a1a0a;
}

.hottakes-disagree-btn,
.hottakes-guess-disagree-btn {
    background: var(--ht-disagree);
    color: #1a0a0a;
}

.hottakes-vote-btn:hover:not(:disabled),
.hottakes-guess-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.hottakes-vote-btn:active,
.hottakes-guess-btn:active { transform: scale(0.97); }

.hottakes-vote-btn:disabled,
.hottakes-guess-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Reveal */
.hottakes-reveal {
    text-align: center;
}

.hottakes-reveal-counts {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.hottakes-agree-count,
.hottakes-disagree-count {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--ht-surface);
}

.hottakes-agree-count { color: var(--ht-agree); }
.hottakes-disagree-count { color: var(--ht-disagree); }

.hottakes-majority {
    border: 2px solid currentColor;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.hottakes-majority-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ht-text-muted);
    margin-bottom: 1rem;
}

.hottakes-player-results {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.hottakes-player-result {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: var(--ht-surface);
    border: 1px solid var(--ht-border);
    animation: ht-result-enter 0.3s ease-out;
}

.hottakes-player-name {
    font-weight: 700;
    min-width: 80px;
}

.hottakes-player-vote,
.hottakes-player-guess {
    font-size: 0.85rem;
    color: var(--ht-text-muted);
}

.hottakes-correct {
    border-color: var(--ht-agree);
}

.hottakes-incorrect {
    border-color: var(--ht-border);
}

.hottakes-mine {
    background: rgba(80, 184, 96, 0.1);
}

.hottakes-scoreboard-container { margin-top: 1rem; }

@keyframes ht-prompt-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ht-result-enter {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 600px) {
    .hottakes-host, .hottakes-player { padding: 0.75rem; border-radius: 12px; }
    .hottakes-prompt-text { font-size: 1rem; }
    .hottakes-timer { font-size: 1.4rem; }
    .hottakes-vote-btn,
    .hottakes-guess-btn { padding: 0.75rem 1.5rem; min-width: 100px; }
    .hottakes-reveal-counts { gap: 0.75rem; }
    .hottakes-player-result { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}

/* ====================================================================
   MATCH THE LIE — Mysterious deep teal / detective theme
   ==================================================================== */

.matchthelie-host, .matchthelie-player {
    --mtl-bg: #101a1a;
    --mtl-surface: #182424;
    --mtl-border: #283838;
    --mtl-text: #d8e8e8;
    --mtl-text-muted: #688888;
    --mtl-accent: #40c8b0;
    --mtl-lie: #e05050;
    --mtl-truth: #50b860;

    background: var(--mtl-bg);
    color: var(--mtl-text);
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 200px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.matchthelie-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mtl-text-muted);
    margin-bottom: 0.5rem;
}

.matchthelie-waiting {
    text-align: center;
    padding: 1rem;
}

.matchthelie-author-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--mtl-accent);
}

.matchthelie-status {
    text-align: center;
    color: var(--mtl-text-muted);
    padding: 0.5rem;
}

.matchthelie-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--mtl-accent);
    text-align: center;
    margin-top: 0.5rem;
}

/* Author input form */
.matchthelie-author-form {
    background: var(--mtl-surface);
    border: 1px solid var(--mtl-border);
    border-radius: 12px;
    padding: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.matchthelie-form-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mtl-accent);
    text-align: center;
    margin-bottom: 0.75rem;
}

.matchthelie-field {
    margin-bottom: 0.75rem;
}

.matchthelie-statement-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mtl-text-muted);
    margin-bottom: 0.25rem;
}

.matchthelie-field input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--mtl-border);
    border-radius: 10px;
    background: var(--mtl-bg);
    color: var(--mtl-text);
    outline: none;
    font-family: inherit;
    color-scheme: dark;
    box-sizing: border-box;
    min-height: 44px;
}

.matchthelie-field input:focus {
    border-color: var(--mtl-accent);
}

.matchthelie-submit-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--mtl-accent);
    color: #101a1a;
    min-height: 48px;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.matchthelie-submit-btn:hover:not(:disabled) {
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(64, 200, 176, 0.4);
}

.matchthelie-submit-btn:active { transform: scale(0.97); }
.matchthelie-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Voting */
.matchthelie-voting {
    text-align: center;
}

.matchthelie-author-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mtl-accent);
    margin-bottom: 0.75rem;
}

.matchthelie-statements {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto 0.75rem;
    text-align: left;
}

.matchthelie-statement {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--mtl-surface);
    border: 1px solid var(--mtl-border);
    border-radius: 10px;
}

.matchthelie-statement-num {
    font-weight: 700;
    color: var(--mtl-accent);
    min-width: 1.5rem;
}

.matchthelie-statement-text {
    flex: 1;
}

.matchthelie-vote-counter {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mtl-text-muted);
    margin-bottom: 0.5rem;
}

/* Vote buttons (player) */
.matchthelie-voter-form {
    text-align: center;
}

.matchthelie-voter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mtl-accent);
    margin-bottom: 0.75rem;
}

.matchthelie-vote-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.matchthelie-vote-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    border: 2px solid var(--mtl-border);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--mtl-surface);
    color: var(--mtl-text);
    min-height: 48px;
    transition: border-color 0.15s, background 0.15s;
}

.matchthelie-vote-btn:hover:not(:disabled) {
    border-color: var(--mtl-accent);
    background: rgba(64, 200, 176, 0.08);
}

.matchthelie-vote-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.matchthelie-vote-selected {
    border-color: var(--mtl-accent);
    background: rgba(64, 200, 176, 0.15);
}

.matchthelie-vote-num {
    font-weight: 700;
    color: var(--mtl-accent);
    min-width: 1.5rem;
}

.matchthelie-vote-text {
    flex: 1;
}

/* Reveal */
.matchthelie-reveal {
    text-align: center;
}

.matchthelie-lie {
    border-color: var(--mtl-lie);
    background: rgba(224, 80, 80, 0.08);
}

.matchthelie-truth {
    border-color: var(--mtl-truth);
}

.matchthelie-statement-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: auto;
    white-space: nowrap;
}

.matchthelie-lie .matchthelie-statement-label {
    color: var(--mtl-lie);
    background: rgba(224, 80, 80, 0.15);
}

.matchthelie-truth .matchthelie-statement-label {
    color: var(--mtl-truth);
    background: rgba(80, 184, 96, 0.15);
}

.matchthelie-vote-results {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 400px;
    margin: 0.75rem auto 0;
    text-align: left;
}

.matchthelie-vote-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: var(--mtl-surface);
    font-size: 0.9rem;
    animation: mtl-result-enter 0.3s ease-out;
}

.matchthelie-voter-name { font-weight: 600; }
.matchthelie-voter-pick { color: var(--mtl-text-muted); }
.matchthelie-voter-result { margin-left: auto; font-weight: 700; }

.matchthelie-vote-correct .matchthelie-voter-result { color: var(--mtl-truth); }
.matchthelie-vote-wrong .matchthelie-voter-result { color: var(--mtl-lie); }

.matchthelie-your-result {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
}

.matchthelie-correct { color: var(--mtl-truth); background: rgba(80, 184, 96, 0.1); }
.matchthelie-wrong { color: var(--mtl-lie); background: rgba(224, 80, 80, 0.1); }

.matchthelie-scoreboard-container { margin-top: 1rem; }

@keyframes mtl-result-enter {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 600px) {
    .matchthelie-host, .matchthelie-player { padding: 0.75rem; border-radius: 12px; }
    .matchthelie-timer { font-size: 1.4rem; }
    .matchthelie-author-form { padding: 0.75rem; }
    .matchthelie-vote-btn { padding: 0.6rem 0.75rem; }
}

/* ====================================================================
   ONE WORD STORY — Cozy warm storytelling theme
   ==================================================================== */

.onewordstory-host, .onewordstory-player {
    --ows-bg: #161210;
    --ows-surface: #201c18;
    --ows-border: #382e24;
    --ows-text: #e8e0d0;
    --ows-text-muted: #8a7860;
    --ows-accent: #d89030;

    background: var(--ows-bg);
    color: var(--ows-text);
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 200px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.onewordstory-topic-display {
    text-align: center;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--ows-surface);
    border-radius: 10px;
    border: 1px solid var(--ows-border);
}

.onewordstory-topic-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ows-text-muted);
}

.onewordstory-topic-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ows-accent);
}

.onewordstory-status {
    text-align: center;
    padding: 0.75rem;
    color: var(--ows-text-muted);
}

.onewordstory-progress {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ows-text-muted);
    margin-bottom: 0.5rem;
}

.onewordstory-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ows-accent);
    text-align: center;
    margin-top: 0.5rem;
}

.onewordstory-current-turn {
    text-align: center;
    font-size: 0.9rem;
    color: var(--ows-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.onewordstory-story-display {
    background: var(--ows-surface);
    border: 1px solid var(--ows-border);
    border-radius: 12px;
    padding: 1rem;
    min-height: 60px;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.onewordstory-word {
    display: inline;
    font-size: 1rem;
    cursor: default;
}

.onewordstory-word:hover {
    color: var(--ows-accent);
}

.onewordstory-empty {
    color: var(--ows-text-muted);
    font-style: italic;
}

.onewordstory-your-turn {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ows-accent);
    margin-bottom: 0.5rem;
    animation: ows-pulse 1.5s ease-in-out infinite;
}

.onewordstory-input-form {
    display: flex;
    gap: 0.5rem;
    max-width: 350px;
    margin: 0 auto 0.5rem;
    align-items: stretch;
}

.onewordstory-word-input {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--ows-border);
    border-radius: 10px;
    background: var(--ows-bg);
    color: var(--ows-text);
    outline: none;
    font-family: inherit;
    color-scheme: dark;
    min-height: 44px;
    box-sizing: border-box;
}

.onewordstory-word-input:focus {
    border-color: var(--ows-accent);
}

.onewordstory-submit-btn {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--ows-accent);
    color: #161210;
    min-height: 48px;
    white-space: nowrap;
    transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}

.onewordstory-submit-btn:hover:not(:disabled) {
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(216, 144, 48, 0.4);
}

.onewordstory-submit-btn:active { transform: scale(0.97); }
.onewordstory-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.onewordstory-waiting {
    text-align: center;
    padding: 0.5rem;
    color: var(--ows-text-muted);
}

.onewordstory-reveal-header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ows-accent);
    margin-bottom: 0.75rem;
}

.onewordstory-story-reveal {
    background: var(--ows-surface);
    border: 1px solid var(--ows-border);
    border-radius: 12px;
    padding: 1.25rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.onewordstory-finish-area {
    text-align: center;
    margin-top: 1rem;
}

.onewordstory-finish-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--ows-accent);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: transparent;
    color: var(--ows-accent);
    min-height: 48px;
    transition: background 0.15s, color 0.15s;
}

.onewordstory-finish-btn:hover {
    background: var(--ows-accent);
    color: var(--ows-bg);
}

@keyframes ows-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@media (max-width: 600px) {
    .onewordstory-host, .onewordstory-player { padding: 0.75rem; border-radius: 12px; }
    .onewordstory-timer { font-size: 1.4rem; }
    .onewordstory-input-form { flex-direction: column; }
    .onewordstory-submit-btn { width: 100%; }
}

/* ====================================================================
   WOULD YOU RATHER — Vibrant dual-tone purple/blue choice theme
   ==================================================================== */

.wyr-host, .wyr-player {
    --wyr-bg: #12101a;
    --wyr-surface: #1a1824;
    --wyr-border: #2e2840;
    --wyr-text: #e0e0f0;
    --wyr-text-muted: #7878a0;
    --wyr-accent: #a060e0;
    --wyr-option-a: #4080e0;
    --wyr-option-b: #e04080;
    --wyr-scorer: #f0c040;

    background: var(--wyr-bg);
    color: var(--wyr-text);
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 200px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.wyr-round-info {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wyr-text-muted);
    margin-bottom: 0.5rem;
}

.wyr-prompt-display {
    text-align: center;
    margin-bottom: 1rem;
}

.wyr-question-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--wyr-accent);
    margin-bottom: 0.75rem;
}

.wyr-options-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.wyr-option {
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--wyr-surface);
    border: 1px solid var(--wyr-border);
}

.wyr-option-a { border-left: 3px solid var(--wyr-option-a); }
.wyr-option-b { border-left: 3px solid var(--wyr-option-b); }

.wyr-option-label {
    font-size: 1rem;
    font-weight: 800;
    min-width: 1.5rem;
}

.wyr-option-a .wyr-option-label { color: var(--wyr-option-a); }
.wyr-option-b .wyr-option-label { color: var(--wyr-option-b); }

.wyr-option-text {
    font-size: 1rem;
    flex: 1;
}

.wyr-or {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--wyr-text-muted);
    text-transform: uppercase;
}

.wyr-status {
    text-align: center;
    padding: 0.5rem;
    color: var(--wyr-text-muted);
}

.wyr-counter {
    font-size: 1rem;
    font-weight: 700;
    color: var(--wyr-accent);
    text-align: center;
    margin-bottom: 0.5rem;
}

.wyr-timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--wyr-accent);
    text-align: center;
    margin-top: 0.5rem;
}

.wyr-submitted-msg {
    color: var(--wyr-accent);
    font-weight: 600;
    text-align: center;
}

.wyr-my-vote {
    font-size: 0.9rem;
    color: var(--wyr-text-muted);
    text-align: center;
    margin-top: 0.25rem;
}

/* Vote buttons */
.wyr-vote-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.wyr-vote-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    border: 2px solid var(--wyr-border);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    background: var(--wyr-surface);
    color: var(--wyr-text);
    min-height: 52px;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.wyr-vote-btn-a { border-left: 3px solid var(--wyr-option-a); }
.wyr-vote-btn-b { border-left: 3px solid var(--wyr-option-b); }

.wyr-vote-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.wyr-vote-btn-a:hover:not(:disabled) {
    border-color: var(--wyr-option-a);
    background: rgba(64, 128, 224, 0.1);
}

.wyr-vote-btn-b:hover:not(:disabled) {
    border-color: var(--wyr-option-b);
    background: rgba(224, 64, 128, 0.1);
}

.wyr-vote-btn:active { transform: scale(0.98); }
.wyr-vote-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.wyr-vote-btn-label {
    font-weight: 800;
    min-width: 1.5rem;
}

.wyr-vote-btn-a .wyr-vote-btn-label { color: var(--wyr-option-a); }
.wyr-vote-btn-b .wyr-vote-btn-label { color: var(--wyr-option-b); }

.wyr-vote-btn-text {
    flex: 1;
}

/* Reveal */
.wyr-vote-count {
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: auto;
}

.wyr-minority {
    border-color: var(--wyr-scorer);
    background: rgba(240, 192, 64, 0.06);
}

.wyr-minority-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wyr-scorer);
    background: rgba(240, 192, 64, 0.15);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: auto;
}

.wyr-voters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0.75rem auto 0;
}

.wyr-voters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--wyr-surface);
}

.wyr-voter-name {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--wyr-bg);
}

.wyr-scorer {
    color: var(--wyr-scorer);
    font-weight: 700;
}

.wyr-me {
    border: 1px solid var(--wyr-accent);
}

.wyr-tie-msg {
    text-align: center;
    font-size: 0.9rem;
    color: var(--wyr-text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

.wyr-scoreboard-container { margin-top: 1rem; }

@media (max-width: 600px) {
    .wyr-host, .wyr-player { padding: 0.75rem; border-radius: 12px; }
    .wyr-question-title { font-size: 1rem; }
    .wyr-timer { font-size: 1.4rem; }
    .wyr-vote-btn { padding: 0.75rem; }
    .wyr-option { padding: 0.6rem 0.75rem; }
}

/* Home page inline error */
.home-error {
    display: none;
    text-align: center;
    color: var(--arcade-magenta);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 0 auto 0.5rem;
    max-width: 480px;
}

/* Share button in host bar */
.btn-share {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    background: transparent;
    color: var(--arcade-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-share:hover {
    border-color: var(--arcade-cyan);
    color: var(--arcade-cyan);
}

/* ── How to Play Help Button & Modal ── */
.help-btn {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1001;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.help-btn.visible {
    display: flex;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: var(--arcade-cyan);
}

.help-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.help-modal-overlay.active {
    display: flex;
}

.help-modal {
    background: var(--arcade-surface);
    border: 1px solid var(--arcade-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 255, 240, 0.15), 0 16px 48px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    overflow-y: auto;
}

.help-modal-title {
    font-family: var(--arcade-font);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--arcade-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 240, 0.3);
    margin-bottom: 0.25rem;
}

.help-modal-subtitle {
    font-family: var(--arcade-font);
    font-size: 0.75rem;
    color: var(--arcade-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.help-modal-body {
    font-size: 0.95rem;
    color: var(--arcade-text);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 1.5rem;
}

.help-modal .btn-qr-close {
    /* reuses existing close button styles */
}
