/* =============================================
   DE HOED — REDESIGNED
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Nunito:wght@400;600;700;800&display=swap');

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

:root {
    --primary: #7c6cf7;
    --primary-dark: #6355d4;
    --primary-glow: rgba(124,108,247,0.25);
    --accent: #ff6b9d;
    --accent-glow: rgba(255,107,157,0.2);
    --bg: #0c0c1d;
    --surface: #14142e;
    --bg-card: #1a1a3e;
    --bg-input: #22224a;
    --text: #eef0f6;
    --text-secondary: #a0a3c0;
    --text-dim: #6b6e90;
    --success: #00cec9;
    --success-glow: rgba(0,206,201,0.15);
    --gold: #fbbf24;
    --gold-dark: #f59e0b;
    --gold-glow: rgba(251,191,36,0.15);
    --danger: #ef4444;
    --danger-glow: rgba(239,68,68,0.15);
    --border: rgba(255,255,255,0.08);
    --border-focus: rgba(124,108,247,0.5);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 24px rgba(124,108,247,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { height: 100%; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

::selection { background: var(--primary); color: white; }

/* === STARS === */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star { position: absolute; background: white; border-radius: 50%; animation: twinkle 3s infinite alternate; }
@keyframes twinkle { 0% { opacity: 0.05; } 100% { opacity: 0.7; } }

/* === LAYOUT === */
.app { position: relative; z-index: 1; min-height: 100vh; }
.screen { display: none; min-height: 100vh; padding: var(--space-xl) var(--space-lg) 6rem; }
.screen.active { display: flex; flex-direction: column; align-items: center; animation: fadeIn 0.25s ease; }
.screen#screen-auth { padding-bottom: var(--space-xl); }
.screen#screen-spin { padding-bottom: var(--space-xl); }
.screen#screen-winner { padding-bottom: var(--space-xl); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bounce { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-12px) scale(1.03); } }
@keyframes dotPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.4); } 50% { box-shadow: 0 0 0 5px rgba(251,191,36,0); } }
@keyframes glowPulse { 0% { opacity: 0.3; } 100% { opacity: 0.8; } }
@keyframes modalPop { from { transform: scale(0.95) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes confettiFall { 0% { transform: translateY(0) rotateZ(0deg) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(105vh) rotateZ(720deg) scale(0.5); opacity: 0; } }

.container { width: 100%; max-width: 480px; }

/* === TYPOGRAPHY === */
.page-title {
    font-family: 'Fredoka', cursive;
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, var(--gold) 0%, var(--accent) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.page-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: var(--space-xl); font-size: 0.9rem; font-weight: 600; }
.section-label { font-size: 0.75rem; color: var(--text-dim); margin-bottom: var(--space-sm); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: var(--space-xs); line-height: 1.4; }

/* === SCREEN HEADER === */
.screen-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--space-xl); width: 100%; gap: var(--space-sm);
}
.screen-header-title {
    font-family: 'Fredoka', cursive; font-size: 1.3rem; font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* === CARD === */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.card + .card { margin-top: var(--space-md); }
.card-title {
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text);
}

/* === BUTTONS === */
.btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    white-space: nowrap;
    text-decoration: none;
    min-height: 44px;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn:active { transform: translateY(0) scale(0.98); filter: brightness(0.95); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; filter: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #8b7cf8);
    color: white;
    box-shadow: 0 4px 16px rgba(124,108,247,0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}
.btn-secondary:hover { border-color: var(--primary); background: rgba(124,108,247,0.08); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 16px rgba(239,68,68,0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: var(--space-sm) var(--space-lg);
    min-height: 36px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text); filter: none; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; min-height: 36px; }
.btn-block { width: 100%; }

/* === INPUTS === */
.input {
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    outline: none;
    width: 100%;
    transition: all var(--transition);
    min-height: 48px;
}
.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.input::placeholder { color: var(--text-dim); font-weight: 600; }
.input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-glow);
    animation: shake 0.4s;
}

.form-group { margin-bottom: var(--space-lg); }
.form-label {
    display: block; font-size: 0.8rem; font-weight: 800;
    color: var(--text-secondary); margin-bottom: var(--space-xs);
    text-transform: uppercase; letter-spacing: 0.04em;
}

/* === PLAYER COUNTER === */
.counter { display: flex; align-items: center; justify-content: center; gap: var(--space-lg); margin: var(--space-sm) 0; }
.counter-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text); font-size: 1.3rem; font-weight: 800;
    cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Nunito', sans-serif;
}
.counter-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(124,108,247,0.12);
    transform: scale(1.05);
}
.counter-btn:active:not(:disabled) { transform: scale(0.95); }
.counter-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.counter-value {
    font-family: 'Fredoka', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 48px;
    text-align: center;
}

.settings-row { display: flex; gap: var(--space-xl); margin-top: var(--space-md); }
.setting-item { flex: 1; }

/* === TOGGLE SWITCH === */
.toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-md) 0; margin-top: var(--space-xs);
    border-top: 1px solid var(--border);
}
.toggle-label { font-weight: 700; font-size: 0.9rem; }
.toggle-switch {
    position: relative; width: 48px; height: 26px; cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute; inset: 0; background: rgba(255,255,255,0.08);
    border-radius: 13px; border: 2px solid rgba(255,255,255,0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    border-radius: 50%; background: var(--text-dim);
    top: 2px; left: 2px; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--primary); border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px); background: white;
}

/* === PLAYER LIST === */
.player-list { list-style: none; margin: var(--space-sm) 0; }
.player-list li {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.player-list li:nth-child(even) { background: rgba(255,255,255,0.015); }
.pl-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem; flex-shrink: 0; color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.pl-name { flex: 1; font-weight: 700; font-size: 0.9rem; }
.pl-badge {
    font-size: 0.65rem; padding: 0.2rem 0.5rem; border-radius: 6px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-host { background: var(--gold-glow); color: var(--gold); }
.badge-ready { background: var(--success-glow); color: var(--success); }
.badge-waiting { background: rgba(255,255,255,0.04); color: var(--text-dim); }

/* === ROOM CODE === */
.room-code-display {
    text-align: center; padding: var(--space-xl) var(--space-lg); margin: var(--space-md) 0;
    background: linear-gradient(135deg, rgba(124,108,247,0.06), rgba(255,107,157,0.04));
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(124,108,247,0.3);
}
.room-code-display .label { font-size: 0.75rem; color: var(--text-dim); margin-bottom: var(--space-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.room-code-display .code {
    font-family: 'Fredoka', cursive; font-size: 2.5rem; letter-spacing: 0.35em; font-weight: 700;
    color: var(--gold); user-select: all;
}

/* === LOBBY SETTINGS === */
.lobby-settings { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-sm); }
.lobby-setting-badge {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: var(--space-xs) var(--space-sm); font-size: 0.73rem;
    color: var(--text-dim); font-weight: 700;
}
.lobby-setting-badge.active { color: var(--success); border-color: rgba(0,206,201,0.25); background: rgba(0,206,201,0.05); }
.lobby-setting-badge.inactive { color: var(--danger); border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.05); }

/* === SUBMISSION === */
.option-slot { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.option-num {
    font-family: 'Fredoka', cursive; color: var(--primary); font-size: 1rem; font-weight: 700;
    width: 28px; text-align: center; flex-shrink: 0;
    background: var(--primary-glow); border-radius: var(--radius-sm);
    padding: var(--space-xs) 0;
}
.option-slot .input { flex: 1; }

.submit-header {
    display: flex; align-items: center; gap: var(--space-md);
    margin-bottom: var(--space-lg); padding: var(--space-md);
    background: var(--surface); border-radius: var(--radius-md); width: 100%;
    border: 1px solid var(--border);
}
.submit-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.9rem; flex-shrink: 0;
}
.submit-meta { flex: 1; }
.submit-meta .name { font-weight: 700; font-size: 0.95rem; }
.submit-meta .sub { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; }

.progress-dots { display: flex; gap: var(--space-xs); }
.pdot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.08);
    transition: all 0.25s;
}
.pdot.done { background: var(--success); border-color: var(--success); box-shadow: 0 0 8px var(--success-glow); }
.pdot.active { border-color: var(--gold); animation: dotPulse 1.5s infinite; }

/* === SLOT MACHINE === */
.slot-wrap { text-align: center; width: 100%; }
.slot-header h2 {
    font-family: 'Fredoka', cursive; font-size: 1.6rem; font-weight: 700; margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, var(--gold), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.slot-header p { color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; }

.slot-status {
    font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--space-sm);
    min-height: 1.4rem; transition: all 0.25s; font-weight: 600;
}
.slot-status.active { color: var(--gold); font-weight: 800; }
.slot-status.dramatic { color: var(--accent); font-weight: 800; font-size: 1.05rem; }

.slot-window {
    position: relative; width: 100%; height: 200px;
    overflow: hidden; background: linear-gradient(180deg, var(--bg-input), var(--bg-card));
    border-radius: var(--radius-xl); border: 3px solid var(--primary);
    margin: var(--space-sm) 0;
    box-shadow: var(--shadow-glow), inset 0 0 40px rgba(0,0,0,0.3);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.slot-window.rolling {
    border-color: var(--gold);
    box-shadow: 0 0 40px rgba(251,191,36,0.25), inset 0 0 40px rgba(0,0,0,0.3);
}
.slot-window::before, .slot-window::after {
    content: ''; position: absolute; left: 0; right: 0;
    height: 60px; z-index: 10; pointer-events: none;
}
.slot-window::before { top: 0; background: linear-gradient(to bottom, var(--bg-card) 10%, transparent); }
.slot-window::after { bottom: 0; background: linear-gradient(to top, var(--bg-card) 10%, transparent); }

.slot-pointer {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 11; width: calc(100% - 1.5rem); height: 56px;
    border: 2px solid rgba(251,191,36,0.35); border-radius: var(--radius-sm);
    background: rgba(251,191,36,0.03);
    pointer-events: none;
}

.slot-glow-l, .slot-glow-r {
    position: absolute; top: 0; bottom: 0; width: 3px;
    z-index: 12; pointer-events: none; opacity: 0;
    transition: opacity 0.25s;
}
.slot-glow-l { left: 0; background: linear-gradient(to bottom, transparent, var(--gold), transparent); }
.slot-glow-r { right: 0; background: linear-gradient(to bottom, transparent, var(--gold), transparent); }
.slot-window.rolling .slot-glow-l,
.slot-window.rolling .slot-glow-r { opacity: 0.6; animation: glowPulse 0.6s infinite alternate; }

.slot-strip { position: absolute; width: 100%; will-change: transform; }
.slot-item {
    height: 56px; display: flex; align-items: center; justify-content: center;
    font-family: 'Fredoka', cursive; font-size: 1.05rem; font-weight: 600;
    padding: 0 1.5rem; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; color: var(--text); user-select: none;
}
.slot-item:nth-child(even) { background: rgba(255,255,255,0.01); }

/* === WINNER === */
.winner-wrap { text-align: center; }
.winner-crown {
    font-size: 4.5rem; display: block; margin-bottom: var(--space-sm);
    animation: bounce 1s ease infinite;
    filter: drop-shadow(0 0 16px rgba(251,191,36,0.3));
}

.winner-fun-text {
    font-family: 'Fredoka', cursive; font-size: 1rem; font-weight: 700;
    color: var(--accent); margin: var(--space-xs) 0;
}
.winner-card {
    font-family: 'Fredoka', cursive; font-size: 1.8rem; font-weight: 700; color: var(--gold);
    margin: var(--space-lg) 0; padding: var(--space-xl); background: rgba(251,191,36,0.04);
    border-radius: var(--radius-lg); border: 2px solid rgba(251,191,36,0.2);
    box-shadow: 0 0 24px rgba(251,191,36,0.08), var(--shadow-md);
    word-break: break-word;
}
.winner-meta { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: var(--space-xl); line-height: 1.7; font-weight: 600; }
.winner-actions { display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; }

.winner-summary-card { text-align: left; margin-top: var(--space-lg); }
.winner-contrib-item {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-sm) 0; border-bottom: 1px solid var(--border);
}
.winner-contrib-item:last-child { border-bottom: none; }
.winner-contrib-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.7rem; flex-shrink: 0; color: #1a1a2e;
}
.winner-contrib-name { font-weight: 700; font-size: 0.85rem; min-width: 60px; }
.winner-contrib-options { flex: 1; font-size: 0.8rem; color: var(--text-dim); font-weight: 600; }
.winner-contrib-options .opt-won { color: var(--gold); font-weight: 800; }

.winner-game-stats {
    display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-md);
    padding-top: var(--space-md); border-top: 1px solid var(--border);
}
.wgs-item {
    flex: 1; min-width: 80px; text-align: center;
    background: var(--surface); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-xs);
    border: 1px solid var(--border);
}
.wgs-item .wgs-num { font-family: 'Fredoka', cursive; font-size: 1.2rem; font-weight: 700; color: var(--primary); display: block; }
.wgs-item .wgs-label { font-size: 0.68rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }

/* === SHARE === */
.share-box { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); }
.share-box .input { font-size: 0.8rem; padding: 0.5rem 0.7rem; background: var(--bg); border-color: rgba(255,255,255,0.05); }

/* === MODAL === */
.modal-bg {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    z-index: 200; align-items: center; justify-content: center; padding: var(--space-lg);
}
.modal-bg.open { display: flex; }
.modal {
    background: var(--bg-card); border-radius: var(--radius-xl); padding: var(--space-2xl);
    max-width: 380px; width: 100%; border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(0,0,0,0.6); text-align: center;
    animation: modalPop 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-icon { font-size: 2.5rem; margin-bottom: var(--space-sm); display: block; }
.modal-title { font-family: 'Fredoka', cursive; font-size: 1.15rem; font-weight: 700; margin-bottom: var(--space-xs); }
.modal-text { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: var(--space-xl); line-height: 1.5; }
.modal-actions { display: flex; gap: var(--space-sm); justify-content: center; }
.modal-actions .btn { flex: 1; }

/* === TOAST === */
.toast {
    position: fixed; top: var(--space-xl); left: 50%; transform: translateX(-50%) translateY(-8px);
    background: var(--bg-card); border: 1px solid var(--border);
    padding: var(--space-sm) var(--space-xl); border-radius: var(--radius-md); font-size: 0.85rem;
    font-weight: 700; z-index: 300; opacity: 0; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; box-shadow: var(--shadow-lg);
    max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(239,68,68,0.3); color: var(--danger); }

/* === CONFETTI === */
.confetti-box { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti-piece { position: absolute; top: -10px; animation: confettiFall linear forwards; }

/* === SOUND TOGGLE === */
.sound-toggle {
    position: fixed; top: var(--space-md); right: var(--space-md); z-index: 50;
    background: rgba(20,20,46,0.8); backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 50%; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem; transition: all var(--transition);
}
.sound-toggle:hover { border-color: var(--primary); transform: scale(1.05); }

/* === AUTH === */
.auth-container { justify-content: center; display: flex; flex-direction: column; min-height: 80vh; }
.auth-tabs { display: flex; gap: 0; margin-bottom: var(--space-xl); background: var(--surface); border-radius: var(--radius-md); padding: 3px; }
.auth-tab {
    flex: 1; padding: var(--space-sm); text-align: center; font-weight: 700;
    cursor: pointer; border-radius: var(--radius-sm);
    color: var(--text-dim); transition: all 0.2s; font-size: 0.9rem;
}
.auth-tab.active { color: var(--text); background: var(--primary); box-shadow: 0 2px 12px var(--primary-glow); }
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn 0.2s ease; }

.onboarding { text-align: center; margin-bottom: var(--space-xl); }
.onboarding-hat {
    font-size: 5rem; display: block; margin-bottom: var(--space-xs);
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(251,191,36,0.2));
}
.onboarding-steps { display: flex; flex-direction: column; gap: var(--space-xs); margin: var(--space-md) 0 var(--space-xl); }
.onboarding-step {
    display: flex; align-items: center; gap: var(--space-md);
    background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border); text-align: left;
}
.obs-emoji { font-size: 1.3rem; flex-shrink: 0; }
.obs-text { font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; }
.anim-in { animation: slideUp 0.4s ease both; }

/* === HOME === */
.home-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--space-md); width: 100%;
}
.home-user { display: flex; align-items: center; gap: var(--space-sm); }
.home-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; color: white;
}
.home-username { font-weight: 700; font-size: 0.9rem; }

/* Page title sizes */
.page-title-sm { font-size: 1.7rem; }

/* Duration picker */
.duration-picker { display: flex; gap: var(--space-sm); align-items: center; }
.duration-select { flex: 1; padding: var(--space-sm) !important; font-size: 0.82rem !important; text-align: center; min-height: 40px; }
.setting-item-wide { flex: 2 !important; }
.form-hint-center { text-align: center; }

/* Join input group */
.join-input-group { display: flex; gap: var(--space-sm); }
.join-code-input {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
}

/* Submit footer */
.submit-footer { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-lg); }

/* Lobby */
.lobby-host-controls { display: none; margin-top: var(--space-lg); }
.lobby-host-controls.visible { display: block; }
.lobby-min-hint { text-align: center; font-size: 0.78rem; color: var(--text-dim); margin-top: var(--space-sm); }
.lobby-waiting-text { text-align: center; font-size: 0.85rem; color: var(--text-dim); margin-top: var(--space-md); display: none; }
.lobby-waiting-text.visible { display: block; }

/* Slot info */
.slot-info { text-align: center; color: var(--text-dim); font-size: 0.82rem; margin-top: var(--space-sm); }

/* Veto link */
.veto-link { margin-top: var(--space-lg); font-size: 0.8rem; color: var(--danger) !important; }

.home-greeting {
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--gold), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: slideUp 0.3s ease;
    line-height: 1.3;
}

.active-game-banner {
    cursor: pointer;
    border-color: rgba(251,191,36,0.3) !important;
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(255,107,157,0.05)) !important;
    transition: all var(--transition);
}
.active-game-banner:hover { border-color: rgba(251,191,36,0.5) !important; transform: translateY(-1px); }
.active-game-inner { display: flex; align-items: center; gap: var(--space-md); }
.active-game-icon { font-size: 1.4rem; }
.active-game-title { font-weight: 700; color: var(--gold); }
.active-game-info { font-size: 0.82rem; color: var(--text-dim); }
.active-game-arrow { margin-left: auto; color: var(--gold); font-size: 1.1rem; }

.quick-stats { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); width: 100%; }
.quick-stat {
    flex: 1; text-align: center; background: var(--bg-card);
    border-radius: var(--radius-md); padding: var(--space-md) var(--space-xs);
    border: 1px solid var(--border);
    animation: popIn 0.25s ease both;
}
.quick-stat:nth-child(2) { animation-delay: 0.06s; }
.quick-stat:nth-child(3) { animation-delay: 0.12s; }
.qs-num { font-family: 'Fredoka', cursive; font-size: 1.6rem; font-weight: 700; color: var(--gold); display: block; line-height: 1.2; }
.qs-label { font-size: 0.68rem; color: var(--text-dim); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }

.recent-game-card {
    cursor: pointer;
    transition: all var(--transition);
    animation: slideUp 0.3s ease 0.15s both;
}
.recent-game-card:hover { transform: translateY(-1px); border-color: rgba(124,108,247,0.2); }
.rgc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.rgc-title { font-family: 'Fredoka', cursive; font-size: 0.85rem; font-weight: 700; color: var(--text-dim); }
.rgc-arrow { color: var(--text-dim); font-size: 1rem; transition: transform 0.15s; }
.recent-game-card:hover .rgc-arrow { transform: translateX(3px); color: var(--primary); }
.rgc-room { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.rgc-winner { color: var(--gold); font-size: 0.82rem; font-weight: 700; }
.rgc-meta { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; font-weight: 600; }

.quick-actions { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); width: 100%; }
.quick-actions .btn { flex: 1; }

/* === WAITING OVERLAY === */
.waiting-overlay {
    position: fixed; inset: 0; z-index: 140;
    background: rgba(12,12,29,0.92); backdrop-filter: blur(10px);
    display: none; align-items: center; justify-content: center; flex-direction: column;
    text-align: center; padding: var(--space-2xl);
    padding-bottom: 5rem;
}
.waiting-overlay.active { display: flex; animation: fadeIn 0.25s ease; }
.waiting-spinner {
    width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.06);
    border-top-color: var(--gold); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin-bottom: var(--space-xl);
}
.waiting-text { font-family: 'Fredoka', cursive; font-size: 1.2rem; font-weight: 700; color: var(--gold); margin-bottom: var(--space-xs); }
.waiting-sub { color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; }

/* === BOTTOM NAV === */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 160;
    display: flex; background: rgba(12,12,29,0.95); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: var(--space-xs) 0; padding-bottom: max(var(--space-xs), env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: var(--space-sm) 0; color: var(--text-dim); text-decoration: none;
    cursor: pointer; transition: all var(--transition); -webkit-tap-highlight-color: transparent;
    position: relative;
}
.nav-item.active { color: var(--primary); }
.nav-item.active::after {
    content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 2px;
    background: var(--primary); border-radius: 0 0 2px 2px;
    box-shadow: 0 0 8px var(--primary-glow);
}
.nav-icon { font-size: 1.15rem; transition: all var(--transition); }
.nav-item.active .nav-icon { transform: scale(1.1) translateY(-1px); }
.nav-label { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.nav-item.has-update .nav-icon { animation: navPulse 1.4s infinite; }
.nav-item.has-update::before {
    content: ''; position: absolute; top: 6px; right: 28%;
    width: 8px; height: 8px; background: var(--accent);
    border-radius: 50%; box-shadow: 0 0 8px var(--accent-glow);
    animation: dotPulse 1.2s infinite;
}
@keyframes navPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* === HISTORY === */
.history-section-title {
    font-family: 'Fredoka', cursive; font-size: 0.85rem; font-weight: 700;
    color: var(--text-dim); margin: var(--space-md) 0 var(--space-sm);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.history-card {
    background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-sm); border: 1px solid var(--border);
    cursor: pointer; transition: all var(--transition);
    animation: slideUp 0.25s ease both;
}
.history-card:hover { transform: translateY(-1px); border-color: rgba(124,108,247,0.15); }
.active-room-card { border-left: 3px solid var(--success); }
.active-room-card:hover { border-left-color: var(--primary); }
.badge-active-voting { background: var(--accent-glow); color: var(--accent); }
.hc-voting-timer { font-size: 0.78rem; color: var(--accent); font-weight: 700; margin-top: var(--space-xs); }
.hc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2px; }
.hc-room { font-family: 'Fredoka', cursive; font-size: 0.9rem; font-weight: 700; }
.hc-date { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.hc-winner { color: var(--gold); font-size: 0.82rem; font-weight: 700; margin-bottom: 2px; }
.hc-meta { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; }
.hc-meta-item { font-size: 0.7rem; color: var(--text-dim); font-weight: 600; }
.hc-veto-badge {
    display: inline-block; background: var(--danger-glow); color: var(--danger);
    font-size: 0.6rem; padding: 1px var(--space-xs); border-radius: 5px;
    font-weight: 800; text-transform: uppercase;
}

/* === GAME DETAIL === */
.detail-header-card { text-align: center; margin-bottom: var(--space-md); }
.detail-room-code {
    font-family: 'Fredoka', cursive; font-size: 1.8rem; font-weight: 700; color: var(--gold);
    letter-spacing: 0.25em;
}
.detail-date { color: var(--text-secondary); font-size: 0.85rem; margin-top: var(--space-xs); font-weight: 600; }
.detail-duration { color: var(--text-dim); font-size: 0.8rem; font-weight: 600; }

.detail-section { margin-bottom: var(--space-md); }
.detail-section-title { font-family: 'Fredoka', cursive; font-size: 0.9rem; font-weight: 700; margin-bottom: var(--space-sm); color: var(--accent); }

.detail-player-row {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-sm) 0; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.detail-player-row:last-child { border-bottom: none; }
.detail-player-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.7rem; flex-shrink: 0; color: #1a1a2e;
}
.detail-player-name { font-weight: 700; font-size: 0.85rem; flex: 1; }
.detail-player-badge {
    font-size: 0.6rem; padding: 1px var(--space-xs); border-radius: 5px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em;
}

.detail-option-item {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-sm) 0; border-bottom: 1px solid rgba(255,255,255,0.02);
    font-size: 0.85rem; font-weight: 600;
}
.detail-option-item:last-child { border-bottom: none; }
.detail-option-winner { color: var(--gold); font-weight: 800; }
.detail-option-winner::before { content: '👑 '; }
.detail-option-author { font-size: 0.72rem; color: var(--text-dim); margin-left: auto; flex-shrink: 0; font-weight: 700; }

.detail-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.detail-stat-card {
    background: var(--surface); border-radius: var(--radius-sm); padding: var(--space-sm);
    text-align: center; border: 1px solid var(--border);
}
.detail-stat-num { font-family: 'Fredoka', cursive; font-size: 1.2rem; font-weight: 700; color: var(--primary); display: block; }
.detail-stat-label { font-size: 0.68rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; }

/* === DASHBOARD === */
.dash-big-stats { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.dash-stat {
    flex: 1; text-align: center; border-radius: var(--radius-md); padding: var(--space-md) var(--space-xs);
    border: 1px solid var(--border); animation: popIn 0.25s ease both;
}
.dash-stat:nth-child(2) { animation-delay: 0.05s; }
.dash-stat:nth-child(3) { animation-delay: 0.1s; }
.dash-stat.purple { background: linear-gradient(135deg, rgba(124,108,247,0.1), rgba(124,108,247,0.02)); }
.dash-stat.pink { background: linear-gradient(135deg, rgba(255,107,157,0.1), rgba(255,107,157,0.02)); }
.dash-stat.teal { background: linear-gradient(135deg, rgba(0,206,201,0.1), rgba(0,206,201,0.02)); }
.dash-big-num { font-family: 'Fredoka', cursive; font-size: 1.8rem; font-weight: 700; display: block; line-height: 1.2; }
.dash-stat.purple .dash-big-num { color: var(--primary); }
.dash-stat.pink .dash-big-num { color: var(--accent); }
.dash-stat.teal .dash-big-num { color: var(--success); }
.dash-big-label { font-size: 0.68rem; color: var(--text-dim); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }

.dash-section { margin-bottom: var(--space-lg); }
.dash-section-title { font-family: 'Fredoka', cursive; font-size: 0.9rem; font-weight: 700; margin-bottom: var(--space-sm); color: var(--accent); }

.streak-dots { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.streak-dot {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; font-weight: 800; color: white;
}
.streak-dot.win { background: var(--success); box-shadow: 0 2px 8px var(--success-glow); }
.streak-dot.loss { background: var(--danger); opacity: 0.4; }

.rivalry-card {
    background: var(--surface); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs); display: flex; align-items: center; gap: var(--space-sm);
    border: 1px solid var(--border);
}
.rivalry-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem; flex-shrink: 0; color: white;
}
.rivalry-info { flex: 1; }
.rivalry-name { font-weight: 700; font-size: 0.85rem; }
.rivalry-stats { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.rivalry-score { font-family: 'Fredoka', cursive; font-size: 1.05rem; font-weight: 700; }

.fun-fact {
    background: var(--surface); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs); font-size: 0.82rem; color: var(--text-secondary); font-weight: 600;
    border-left: 3px solid var(--primary);
}

.fav-option-card {
    background: var(--surface); border-radius: var(--radius-md); padding: var(--space-md);
    text-align: center; border: 1px solid var(--border);
}
.fav-option-text {
    font-family: 'Fredoka', cursive; font-size: 1.1rem; font-weight: 700; color: var(--gold);
    margin-top: var(--space-xs);
}
.fav-option-sub { font-size: 0.72rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }

/* === LOADING / EMPTY === */
.loading-spinner-wrap { text-align: center; padding: var(--space-2xl) 0; color: var(--text-dim); }
.loading-spinner {
    width: 32px; height: 32px; border: 3px solid rgba(255,255,255,0.06);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto var(--space-md);
}

.empty-state { text-align: center; padding: var(--space-2xl) var(--space-lg); }
.empty-state-emoji { font-size: 2.5rem; margin-bottom: var(--space-sm); display: block; }
.empty-state-text { color: var(--text-secondary); font-size: 0.9rem; font-weight: 700; }
.empty-state-sub { color: var(--text-dim); font-size: 0.8rem; margin-top: var(--space-xs); }

/* === VOTING === */
.vote-explanation {
    background: linear-gradient(135deg, rgba(124,108,247,0.06), rgba(255,107,157,0.04));
    border: 1px solid rgba(124,108,247,0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    width: 100%;
}
.vote-explanation-text {
    font-size: 0.82rem; color: var(--text-dim); line-height: 1.5;
}
.vote-explanation-text strong { color: var(--text-secondary); }

.vote-timer-bar {
    position: relative; width: 100%; height: 40px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border);
    margin-bottom: var(--space-sm); overflow: hidden;
}
.vote-timer-fill {
    position: absolute; top: 0; left: 0; bottom: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-md); transition: width 1s linear;
    width: 100%; opacity: 0.15;
}
.vote-timer-text {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: 'Fredoka', cursive; font-size: 1rem; font-weight: 700; color: var(--text);
    z-index: 1;
}
.vote-timer-hint {
    text-align: center; font-size: 0.75rem; color: var(--text-dim); margin-bottom: var(--space-md);
}

.vote-progress-info {
    text-align: center; margin-bottom: var(--space-md);
    font-size: 0.82rem; color: var(--text-dim); font-weight: 700;
}
.vote-progress-info strong { color: var(--text); }
.vote-progress-info .remaining { color: var(--accent); }

.vote-option-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: var(--space-lg); margin-bottom: var(--space-sm);
    border: 1px solid var(--border); position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.25s ease both;
    width: 100%;
}
.vote-option-card.voted-for {
    border-color: rgba(0,206,201,0.35);
    background: rgba(0,206,201,0.03);
}
.vote-option-card.voted-against {
    border-color: rgba(239,68,68,0.25);
    background: rgba(239,68,68,0.02);
}

.vote-option-text {
    font-family: 'Fredoka', cursive; font-size: 1.05rem; font-weight: 700;
    color: var(--text); margin-bottom: var(--space-sm); word-break: break-word;
}

.vote-buttons { display: flex; gap: var(--space-sm); }
.vote-btn {
    flex: 1; padding: var(--space-sm); border-radius: var(--radius-md);
    border: 2px solid var(--border); background: var(--surface);
    cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
    font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.85rem;
    color: var(--text-secondary); min-height: 48px;
}
.vote-btn:hover { transform: translateY(-1px); }
.vote-btn:active { transform: scale(0.97); }

.vote-btn-for:hover, .vote-btn-for.active {
    border-color: var(--success); background: rgba(0,206,201,0.08);
    color: var(--success);
}
.vote-btn-against:hover, .vote-btn-against.active {
    border-color: var(--danger); background: rgba(239,68,68,0.06);
    color: var(--danger);
}
.vote-btn .vote-icon { font-size: 1.1rem; }
.vote-btn .vote-count {
    font-size: 0.72rem; padding: 1px var(--space-xs);
    border-radius: 6px; background: rgba(255,255,255,0.04);
    min-width: 20px; text-align: center;
}

.vote-legend {
    display: flex; gap: var(--space-lg); justify-content: center;
    margin-top: var(--space-md); padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    width: 100%;
}
.vote-legend-item {
    display: flex; align-items: center; gap: var(--space-xs);
    font-size: 0.72rem; color: var(--text-dim); font-weight: 700;
}
.vl-dot { width: 8px; height: 8px; border-radius: 50%; }
.vl-dot.vl-for { background: var(--success); }
.vl-dot.vl-against { background: var(--danger); opacity: 0.6; }

.vote-host-controls { margin-top: var(--space-lg); width: 100%; }

/* === ONLINE DOT === */
.online-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; vertical-align: middle; margin-left: 4px;
}
.online-dot.online { background: var(--success); box-shadow: 0 0 6px rgba(0,206,201,0.5); animation: glowPulse 2s ease-in-out infinite; }
.online-dot.offline { background: var(--text-dim); opacity: 0.5; }

/* === ADMIN === */
.admin-tabs {
    display: flex; gap: 0; margin-bottom: var(--space-lg);
    background: var(--bg-card); border-radius: var(--radius-md); padding: 3px;
    border: 1px solid var(--border);
}
.admin-tab {
    flex: 1; padding: var(--space-sm); text-align: center; font-weight: 700;
    cursor: pointer; border-radius: var(--radius-sm);
    color: var(--text-dim); transition: all 0.2s; font-size: 0.85rem;
}
.admin-tab.active { color: var(--text); background: var(--primary); box-shadow: 0 2px 12px var(--primary-glow); }
.admin-tab-content { display: none; animation: fadeIn 0.2s ease; }
.admin-tab-content.active { display: block; }

.admin-user-card, .admin-item-card {
    background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-sm); border: 1px solid var(--border);
    animation: slideUp 0.25s ease both;
}
.admin-user-card:hover, .admin-item-card:hover { border-color: rgba(124,108,247,0.2); }

.admin-user-header, .admin-item-header {
    display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-sm);
}
.admin-user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; color: white; flex-shrink: 0;
}
.admin-user-info { flex: 1; }
.admin-user-name { font-weight: 700; font-size: 0.9rem; }
.admin-user-meta { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.admin-user-actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

.admin-item-title { font-family: 'Fredoka', cursive; font-size: 0.9rem; font-weight: 700; flex: 1; }
.admin-item-meta { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.admin-item-body {
    display: flex; flex-direction: column; gap: 2px;
    font-size: 0.78rem; color: var(--text-secondary); font-weight: 600;
}

/* === INFO CARD (lobby) === */
.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    width: 100%;
}
.info-card-text {
    font-size: 0.82rem; color: var(--text-dim); line-height: 1.5;
}
.info-card-text strong { color: var(--text-secondary); }

/* =============================================
   VOTING RESULTS SCREEN
   ============================================= */
.vr-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}
.vr-stat {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    border: 1px solid var(--border);
}
.vr-stat-num { display: block; font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.vr-stat-label { display: block; font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }

.vr-chart-card { margin-bottom: var(--space-lg); }

.vr-bar-chart { display: flex; flex-direction: column; gap: var(--space-md); }
.vr-bar-row { animation: fadeSlideUp 0.4s ease both; }
.vr-bar-label { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-bar-track {
    display: flex;
    height: 28px;
    background: var(--surface-hover);
    border-radius: var(--radius-sm);
    overflow: hidden;
    gap: 2px;
}
.vr-bar-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 2px;
}
.vr-bar-for { background: var(--success); opacity: 0.85; }
.vr-bar-for.vr-bar-approved { opacity: 1; }
.vr-bar-for.vr-bar-rejected { opacity: 0.5; background: var(--text-dim); }
.vr-bar-against { background: var(--danger); opacity: 0.7; }
.vr-bar-numbers { display: flex; gap: var(--space-sm); margin-top: 3px; font-size: 0.78rem; }
.vr-bar-for-num { color: var(--success); font-weight: 600; }
.vr-bar-against-num { color: var(--danger); font-weight: 600; }

.vr-donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
}
.vr-donut-svg { width: 140px; height: 140px; }
.vr-donut-center { text-align: center; }
.vr-donut-pct { font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; }
.vr-donut-sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; }

.vr-facts { display: flex; flex-direction: column; gap: var(--space-sm); }
.vr-fact {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-hover);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    animation: fadeSlideUp 0.4s ease both;
}
.vr-fact-icon { font-size: 1.2rem; flex-shrink: 0; }
.vr-fact-text { color: var(--text); line-height: 1.4; }

.vr-option-details { display: flex; flex-direction: column; gap: var(--space-sm); }
.vr-option-detail {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    animation: fadeSlideUp 0.35s ease both;
}
.vr-option-approved { border-left: 3px solid var(--success); }
.vr-option-rejected { border-left: 3px solid var(--danger); opacity: 0.8; }
.vr-od-header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.vr-od-text { font-weight: 600; font-size: 0.92rem; }
.vr-od-badge { font-size: 0.72rem; padding: 2px 8px; border-radius: var(--radius-full); white-space: nowrap; }
.badge-approved { background: rgba(34,197,94, 0.15); color: var(--success); }
.badge-rejected { background: rgba(239,68,68, 0.15); color: var(--danger); }
.vr-od-ring-wrap { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.vr-mini-ring { width: 44px; height: 44px; }
.vr-od-ring-center { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.vr-od-votes { font-size: 0.8rem; color: var(--text-dim); }

.vr-action { margin-top: var(--space-xl); text-align: center; }
.vr-action-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: var(--space-sm); }
.vr-waiting-host { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); padding: var(--space-xl) 0; color: var(--text-dim); }
.waiting-spinner-sm {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.detail-votes-chart { margin-top: var(--space-md); }
.detail-vote-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.82rem;
}
.detail-vote-bar-label { width: 120px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.detail-vote-bar-track { flex: 1; height: 20px; background: var(--surface-hover); border-radius: var(--radius-sm); overflow: hidden; display: flex; gap: 2px; }
.detail-vote-bar-fill { height: 100%; border-radius: var(--radius-sm); }
.detail-vote-bar-num { width: 60px; text-align: right; color: var(--text-dim); font-size: 0.78rem; flex-shrink: 0; }

/* === RESPONSIVE === */
@media (max-width: 500px) {
    .page-title { font-size: 1.9rem; }
    .winner-card { font-size: 1.5rem; }
    .card { padding: var(--space-lg); border-radius: var(--radius-md); }
    .slot-window { height: 170px; }
    .slot-item { height: 56px; font-size: 0.95rem; }
    .room-code-display .code { font-size: 2.1rem; }
    .settings-row { flex-direction: column; gap: 0; }
    .quick-actions { flex-direction: column; }
    .dash-big-stats { flex-direction: column; }
    .winner-crown { font-size: 3.5rem; }
    .vr-stats-row { grid-template-columns: repeat(2, 1fr); }
    .vr-donut-wrap { flex-direction: column; }
}

@media (min-width: 768px) {
    .container { max-width: 540px; }
    .screen { padding: var(--space-2xl) var(--space-xl) 6rem; }
}
