/* ── Fonts ──────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700;900&family=Barlow+Condensed:wght@700;900&display=swap');

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:           #0c1a25;
    --bg-card:      #0f2233;
    --bg-card2:     #132a3e;
    --accent:       #e8304a;
    --accent-blue:  #1d6fa4;
    --text:         #f0f0f0;
    --text-muted:   #8aa5bb;
    --border:       rgba(255,255,255,0.08);
    --radius:       16px;
    --radius-sm:    10px;
    --hot:          #ff5a1f;
    --hot-glow:     rgba(255,90,31,0.3);
    --transition:   0.22s ease;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Barlow', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

/* ── Screen Layout ──────────────────────────────────────────── */
.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100dvh;
    overflow-y: auto;
    padding: 24px 20px 32px;
    gap: 16px;
}

/* ── Logo ───────────────────────────────────────────────────── */
.logo-wrap {
    display: flex;
    justify-content: center;
    padding-top: env(safe-area-inset-top, 0);
}

.logo {
    height: 64px;
    object-fit: contain;
}

.logo-small {
    height: 32px;
    object-fit: contain;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    width: 100%;
    max-width: 480px;
}

.card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: 'Barlow', sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), opacity var(--transition);
    text-decoration: none;
    margin-top: 12px;
    -webkit-appearance: none;
    appearance: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    letter-spacing: 0.03em;
}

.btn-secondary {
    background: var(--bg-card2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

.btn-ghost-sm {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

/* ── Player Registration ────────────────────────────────────── */
#playerList {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.player-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
    flex-shrink: 0;
}

.player-row input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    padding: 12px 14px;
    outline: none;
    transition: border-color var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.player-row input:focus {
    border-color: var(--accent);
}

.player-row input.error {
    border-color: var(--accent);
    background: rgba(232,48,74,0.08);
}

.btn-remove {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.btn-remove:active { background: rgba(232,48,74,0.2); }

.hint {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* ── Gamemode Selection ──────────────────────────────────────── */
.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition);
    user-select: none;
}

.mode-card input[type="radio"] { display: none; }

.mode-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
}

.mode-card span {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-muted);
}

.mode-card.selected,
.mode-card:has(input:checked) {
    border-color: var(--accent);
    transform: scale(1.03);
}

.mode-card.selected span,
.mode-card:has(input:checked) span {
    color: var(--text);
}

.players-preview { margin-bottom: 4px; }

.players-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.players-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text);
}

/* ── Game Screen ────────────────────────────────────────────── */
.game-screen {
    padding: 0;
    gap: 0;
    position: relative;
    z-index: 1;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0));
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.mode-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    margin: 10px auto 0;
    display: inline-block;
    letter-spacing: 0.04em;
}

.badge-normal {
    background: rgba(29,111,164,0.2);
    color: #5bc4f5;
    border: 1px solid rgba(29,111,164,0.3);
}

.badge-hot {
    background: rgba(255,90,31,0.2);
    color: #ff9b6b;
    border: 1px solid rgba(255,90,31,0.3);
}

.tap-hint {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 6px 20px;
    transition: opacity 0.4s ease;
}

/* ── Card Flip ───────────────────────────────────────────────── */
.card-flip-container {
    flex: 1;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 16px 20px;
    perspective: 1200px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-flip {
    width: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
    border-radius: var(--radius);
}

.card-flip.is-flipped {
    transform: rotateY(180deg);
}

.card-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    gap: 12px;
}

.card-front {
    min-height: 260px;
}

.card-back {
    transform: rotateY(180deg);
    /* position absolute only on front so back can grow */
}

.card-front {
    position: absolute;
    inset: 0;
}

.mode-hot .card-face {
    border-color: rgba(255,90,31,0.25);
}

.card-logo {
    height: 70px;
    object-fit: contain;
    opacity: 0.6;
}

.card-start-text {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
}

.card-player {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 28px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-height: 34px;
}

.card-question {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    line-height: 1.3;
}

.shots-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shot-img {
    height: 44px;
    object-fit: contain;
    filter: brightness(1.1);
}

/* ── Scoreboard ──────────────────────────────────────────────── */
.scoreboard {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    max-width: 500px;
    margin: 0 auto;
}

.scoreboard.open {
    transform: translateY(0);
}

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

.scoreboard-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
}

.score-row.score-highlight {
    border-color: rgba(232,48,74,0.3);
}

.score-name {
    font-weight: 700;
    font-size: 16px;
}

.score-shots {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.score-count {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent);
    min-width: 24px;
    text-align: right;
    transition: transform 0.15s ease;
}

/* ── Hot Mode Accent ─────────────────────────────────────────── */
.mode-hot .btn-primary { background: var(--hot); }
.mode-hot .card-player { color: var(--hot); }
.mode-hot .score-count { color: var(--hot); }
.mode-hot .player-number { background: var(--hot); }

.logout-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s;
}
.logout-link:hover { color: var(--accent); }
@media (min-width: 480px) {
    .card { padding: 32px 28px; }
    .card-question { font-size: 26px; }
}

@media (orientation: landscape) and (max-height: 500px) {
    .logo-wrap { display: none; }
    .card-flip { min-height: 180px; }
    .card-face { padding: 16px 20px; }
}

/* ── Tap-Next Hinweis auf der Karte ──────────────────────────── */
.card-tap-next {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    margin-top: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    min-height: 18px;
    text-align: center;
}

/* ── Zurück-Button im Confirm Panel ──────────────────────────── */
.btn-back-task {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: left;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

/* ── Task Type Badge ─────────────────────────────────────────── */
.task-type-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* ── Player Chips on Card ────────────────────────────────────── */
.card-players {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    min-height: 28px;
}

.player-chip-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

/* ── Header Actions ──────────────────────────────────────────── */
.header-actions {
    display: flex;
    gap: 4px;
}

/* ── Confirm Panel ───────────────────────────────────────────── */
.confirm-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.confirm-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 24px 20px 28px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.confirm-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 20px;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.05em;
    color: var(--text);
}

.confirm-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.confirm-player-btn {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 24px;
    color: var(--text-muted);
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 44px;
}

.confirm-player-btn.active {
    background: rgba(232,48,74,0.15);
    border-color: var(--accent);
    color: var(--text);
}

.confirm-shots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.shot-img-sm {
    height: 36px;
    object-fit: contain;
}

.shots-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-confirm {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    min-height: 52px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
}

.btn-confirm:active { transform: scale(0.97); }

.btn-skip {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* ── Drawer (Scoreboard + Log) ───────────────────────────────── */
.drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0 20px calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: 100;
    max-height: 75vh;
    overflow-y: auto;
    max-width: 500px;
    margin: 0 auto;
}

.drawer.open { transform: translateY(0); }

.drawer-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto 8px;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 16px;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.drawer-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Log ─────────────────────────────────────────────────────── */
.log-count {
    font-size: 13px;
    color: var(--text-muted);
}

.log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 8px;
}

.log-empty {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

.log-entry {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-type {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.log-time {
    font-size: 12px;
    color: var(--text-muted);
}

.log-question {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
}

.log-drinkers {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.log-no-drink {
    color: var(--text-muted);
}

.log-shots-badge {
    background: rgba(232,48,74,0.15);
    border: 1px solid rgba(232,48,74,0.3);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--accent);
}

/* ── Hot Mode Overrides ──────────────────────────────────────── */
.mode-hot .confirm-player-btn.active {
    background: rgba(255,90,31,0.15);
    border-color: var(--hot);
}
.mode-hot .btn-confirm { background: var(--hot); }

/* ── Mode List (Gamemode Selection) ──────────────────────────── */
.mode-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.mode-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    user-select: none;
}
.mode-row input[type="radio"] { display: none; }
.mode-row.selected {
    border-color: var(--mode-color, var(--accent));
    background: color-mix(in srgb, var(--mode-color, var(--accent)) 8%, transparent);
}
.mode-row-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mode-row-label { font-weight: 800; font-size: 16px; color: var(--text); }
.mode-row-sub   { font-size: 12px; color: var(--text-muted); }
.mode-row-check {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 900;
    color: transparent;
    transition: all 0.18s;
    flex-shrink: 0;
}
.mode-row.selected .mode-row-check {
    background: var(--mode-color, var(--accent));
    border-color: var(--mode-color, var(--accent));
    color: #fff;
}

/* ── Mode Badge variants ─────────────────────────────────────── */
.mode-normal-badge  { background: rgba(29,111,164,0.2);  color: #5bc4f5; border: 1px solid rgba(29,111,164,0.3); }
.mode-hot-badge     { background: rgba(255,90,31,0.2);   color: #ff9b6b; border: 1px solid rgba(255,90,31,0.3); }
.mode-absturz-badge { background: rgba(124,58,237,0.2);  color: #c4b5fd; border: 1px solid rgba(124,58,237,0.3); }
.mode-furios-badge  { background: rgba(220,38,38,0.2);   color: #fca5a5; border: 1px solid rgba(220,38,38,0.3); }
.mode-chaos-badge   { background: rgba(5,150,105,0.2);   color: #6ee7b7; border: 1px solid rgba(5,150,105,0.3); }

/* ── Mode body accent colors ─────────────────────────────────── */
.mode-absturz .btn-primary    { background: #7c3aed; }
.mode-absturz .card-player    { color: #c4b5fd; }
.mode-absturz .score-count    { color: #c4b5fd; }
.mode-absturz .player-number  { background: #7c3aed; }
.mode-absturz .btn-confirm    { background: #7c3aed; }

.mode-furios .btn-primary     { background: #dc2626; }
.mode-furios .card-player     { color: #fca5a5; }
.mode-furios .score-count     { color: #dc2626; }
.mode-furios .player-number   { background: #dc2626; }
.mode-furios .btn-confirm     { background: #dc2626; }

.mode-chaos .btn-primary      { background: #059669; }
.mode-chaos .card-player      { color: #6ee7b7; }
.mode-chaos .score-count      { color: #059669; }
.mode-chaos .player-number    { background: #059669; }
.mode-chaos .btn-confirm      { background: #059669; }

/* ── Chaos Roulette Overlay ──────────────────────────────────── */
.chaos-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chaos-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px 24px;
}

/* Revolver Cylinder */
.revolver-cylinder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 4px solid #333;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cylinder-slot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #111;
    border: 2px solid #444;
}
.cylinder-slot:nth-child(1) { top: 8px;  left: 50%; transform: translateX(-50%); }
.cylinder-slot:nth-child(2) { top: 28px; right: 12px; }
.cylinder-slot:nth-child(3) { bottom: 28px; right: 12px; }
.cylinder-slot:nth-child(4) { bottom: 8px; left: 50%; transform: translateX(-50%); }
.cylinder-slot:nth-child(5) { bottom: 28px; left: 12px; }
.cylinder-slot:nth-child(6) { top: 28px; left: 12px; }

.cylinder-slot.filled { background: #e8304a; border-color: #ff4d6a; box-shadow: 0 0 8px rgba(232,48,74,0.8); }

.chaos-revolver.spinning .revolver-cylinder {
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    80%  { transform: rotate(1440deg); }
    100% { transform: rotate(1080deg); }
}

.chaos-revolver.hit .cylinder-slot.filled {
    animation: pulse-red 0.5s ease infinite alternate;
}

@keyframes pulse-red {
    from { box-shadow: 0 0 8px rgba(232,48,74,0.8); }
    to   { box-shadow: 0 0 24px rgba(232,48,74,1); }
}

.chaos-result {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    color: #e8304a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    display: none;
}


/* ── Chaos Roulette Overlay ──────────────────────────────────── */
.chaos-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chaos-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px 24px;
}

.chaos-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: -10px;
}

.chaos-svg {
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 0 20px rgba(232,48,74,0.15));
    will-change: transform;
}

.chaos-result {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 26px;
    font-weight: 900;
    text-align: center;
    color: var(--text);
    letter-spacing: 0.04em;
    line-height: 1.3;
    display: none;
    animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chaos-bang {
    display: block;
    font-size: 52px;
    font-weight: 900;
    color: #e8304a;
    letter-spacing: 0.06em;
    line-height: 1;
    animation: bangPop 0.45s cubic-bezier(0.17, 0.89, 0.32, 1.27);
    text-shadow: 0 0 30px rgba(232,48,74,0.8);
}

.chaos-click {
    display: block;
    font-size: 42px;
    font-weight: 900;
    color: #6ee7b7;
    letter-spacing: 0.12em;
    line-height: 1;
    text-shadow: 0 0 20px rgba(110,231,183,0.5);
}

@keyframes bangPop {
    0%   { transform: scale(0.3) rotate(-5deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── Chaos Events ────────────────────────────────────────────── */

/* Slot Machine */
.slots-wrap { display:flex; flex-direction:column; align-items:center; gap:12px; }
.slots-reels {
    display:flex; gap:8px;
    background:#0a1020; border:2px solid #2a2a5e;
    border-radius:12px; padding:12px 16px;
}
.slot-reel {
    width:60px; height:70px;
    background:#111; border:2px solid #333; border-radius:8px;
    display:flex; align-items:center; justify-content:center;
    font-size:36px; overflow:hidden;
}
.slot-symbol { display:block; transition:none; }
.slot-symbol.spinning-reel { animation:slotSpin 0.1s linear infinite; }
.slot-symbol.settled { animation:slotSettle 0.3s cubic-bezier(0.17,0.89,0.32,1.27); }
@keyframes slotSpin { 0%{transform:translateY(-100%)} 100%{transform:translateY(100%)} }
@keyframes slotSettle { 0%{transform:translateY(-30%) scale(1.3)} 100%{transform:translateY(0) scale(1)} }

/* Dice */
.dice-wrap { display:flex; gap:24px; align-items:center; }
.dice-col   { display:flex; flex-direction:column; align-items:center; gap:8px; }
.dice-name  { font-size:13px; font-weight:700; color:var(--text-muted); }
.die-face   {
    font-size:52px; line-height:1;
    display:block;
    filter:drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.die-face.rolling { animation:diceRoll 0.15s linear infinite; }
.die-face.settled { animation:diceSettle 0.4s cubic-bezier(0.17,0.89,0.32,1.27); }
@keyframes diceRoll   { 0%,100%{transform:rotate(-15deg)} 50%{transform:rotate(15deg)} }
@keyframes diceSettle { 0%{transform:scale(1.4) rotate(10deg)} 100%{transform:scale(1) rotate(0)} }

/* Card Draw */
.card-draw-wrap { perspective:600px; }
.playing-card {
    width:80px; height:110px;
    background:#fff; border-radius:10px;
    display:flex; align-items:center; justify-content:center;
    transform:rotateY(90deg);
    transition:transform 0.5s ease;
    box-shadow:0 4px 20px rgba(0,0,0,0.5);
}
.playing-card.flipped { transform:rotateY(0deg); }
.playing-card.red-card .card-val { color:#e8304a; }
.card-val { font-size:22px; font-weight:900; color:#1a1a2e; }

/* Wheel */
.wheel-svg { display:block; overflow:visible; filter:drop-shadow(0 4px 20px rgba(0,0,0,0.6)); }

/* Shot Roulette */
.roulette-wrap { display:flex; align-items:center; justify-content:center; }
.roulette-number {
    font-family:'Barlow Condensed',sans-serif;
    font-size:100px; font-weight:900;
    color:var(--accent);
    line-height:1;
    text-shadow:0 0 40px rgba(232,48,74,0.5);
    min-width:120px; text-align:center;
    animation:numFlicker 0.08s linear infinite;
}
.roulette-number.settled { animation:numPop 0.4s cubic-bezier(0.17,0.89,0.32,1.27) forwards; }
@keyframes numFlicker { 0%,100%{opacity:1} 50%{opacity:0.6} }
@keyframes numPop     { 0%{transform:scale(1.5)} 100%{transform:scale(1)} }

/* Double or Nothing */
.don-wrap { perspective:500px; }
.coin {
    width:100px; height:100px; border-radius:50%;
    position:relative;
    transform-style:preserve-3d;
}
.coin-inner {
    width:100%; height:100%;
    position:relative; transform-style:preserve-3d;
    transition:transform 0.05s;
}
.coin.flipping .coin-inner { animation:coinFlip 1.5s ease forwards; }
.coin.show-front .coin-inner { transform:rotateY(0deg); }
.coin.show-back  .coin-inner { transform:rotateY(180deg); }
@keyframes coinFlip {
    0%   {transform:rotateY(0)}
    100% {transform:rotateY(1440deg)}
}
.coin-front, .coin-back {
    position:absolute; inset:0; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-family:'Barlow Condensed',sans-serif;
    font-size:26px; font-weight:900;
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
}
.coin-front { background:#f59e0b; color:#fff; box-shadow:0 0 20px rgba(245,158,11,0.5); }
.coin-back  { background:#1a1a2e; color:#6ee7b7; border:3px solid #6ee7b7; transform:rotateY(180deg); }

/* ── Chaos Tap-to-Start Screen ───────────────────────────────── */
.tap-start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 20px;
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 20px;
    transition: border-color 0.2s, background 0.2s;
    animation: tapPulse 2s ease-in-out infinite;
}
.tap-start-screen:active { transform: scale(0.97); }
@keyframes tapPulse {
    0%,100% { border-color: rgba(255,255,255,0.15); }
    50%      { border-color: rgba(255,255,255,0.35); }
}
.tap-event-icon {
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.06);
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.tap-event-icon svg { width: 60px; height: 60px; }
.tap-event-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 28px; font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
}
.tap-event-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tap-event-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    text-align: center;
    line-height: 1.5;
    max-width: 260px;
}

/* ── Slot Machine – SVG symbols ──────────────────────────────── */
.slots-reels {
    display: flex;
    gap: 6px;
    background: #0a1020;
    border: 2px solid #2a2a5e;
    border-radius: 14px;
    padding: 10px 12px;
}
.slot-reel {
    width: 70px; height: 70px;
    background: #111;
    border: 2px solid #333;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: border-color 0.3s;
}
.slot-reel.reel-win { border-color: #fbbf24; box-shadow: 0 0 12px rgba(251,191,36,0.4); }
.slot-symbol { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; }
.slot-symbol svg { width: 48px; height: 48px; }
.slot-symbol.spinning-reel { animation: slotBlur 0.12s linear infinite; }
.slot-symbol.settled { animation: slotPop 0.35s cubic-bezier(0.17,0.89,0.32,1.27); }
@keyframes slotBlur { 0%,100%{opacity:0.4;transform:scaleY(0.8)} 50%{opacity:1;transform:scaleY(1)} }
@keyframes slotPop  { 0%{transform:scale(1.4)} 100%{transform:scale(1)} }



/* ── Playing Card (new) ──────────────────────────────────────── */
.card-draw-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.pcard {
    width: 110px;
    height: 155px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    will-change: transform;
}
.pcard-back {
    width: 100%; height: 100%;
    border-radius: 12px;
    background: #1a237e;
    border: 3px solid rgba(255,255,255,0.15);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.pcard-back-lines {
    width: 100%; height: 100%;
    background:
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.04) 0px,
            rgba(255,255,255,0.04) 2px,
            transparent 2px,
            transparent 10px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,0.04) 0px,
            rgba(255,255,255,0.04) 2px,
            transparent 2px,
            transparent 10px
        );
}
.pcard-front {
    width: 100%; height: 100%;
    border-radius: 12px;
    background: #fff;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px;
    box-sizing: border-box;
}
.pcard-tl {
    font-size: 16px; font-weight: 900;
    line-height: 1.1; text-align: left;
    align-self: flex-start;
}
.pcard-mid {
    font-size: 52px; line-height: 1;
    text-align: center;
}
.pcard-br {
    font-size: 16px; font-weight: 900;
    line-height: 1.1; text-align: right;
    align-self: flex-end;
    transform: rotate(180deg);
}

/* ── Card Counter ────────────────────────────────────────────── */
.card-counter {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px 10px;
    min-width: 36px;
    text-align: center;
}

/* ── Storm Banner ────────────────────────────────────────────── */
.storm-banner {
    background: linear-gradient(90deg, #e8304a, #ff5a1f);
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-align: center;
    padding: 6px 16px;
    width: 100%;
    animation: stormPulse 1s ease-in-out infinite alternate;
}
@keyframes stormPulse {
    from { opacity: 0.85; }
    to   { opacity: 1; }
}

/* ── Global Event Overlay ────────────────────────────────────── */
.global-event-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0,0,0,0.93);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.global-event-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 28px;
    text-align: center;
    max-width: 360px;
    width: 100%;
}
.global-event-icon {
    font-size: 72px;
    line-height: 1;
    animation: eventPop 0.5s cubic-bezier(0.17,0.89,0.32,1.27);
}
@keyframes eventPop {
    0%   { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.global-event-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 38px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    line-height: 1;
}
.global-event-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}

/* ── Timer Ring ──────────────────────────────────────────────── */
.global-event-timer {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timer-ring { position: relative; width: 110px; height: 110px; }
.timer-ring svg { width: 110px; height: 110px; }
#timerArc { transition: stroke-dashoffset 1s linear; }
.timer-seconds {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #fff;
}

/* ── Game Over ───────────────────────────────────────────────── */
.gameover-scores {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gameover-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px 16px;
}
.gameover-rank  { font-size: 22px; min-width: 32px; }
.gameover-name  { flex: 1; font-weight: 700; font-size: 16px; color: #fff; text-align: left; }
.gameover-shots { font-size: 14px; color: var(--accent); font-weight: 700; }

/* ── Gamemode Selection Options ──────────────────────────────── */
.options-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.options-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    display: block;
}
.option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.option-info { display: flex; flex-direction: column; gap: 2px; }
.option-label { font-weight: 700; font-size: 15px; color: var(--text); }
.option-sub   { font-size: 12px; color: var(--text-muted); }
.toggle-switch { position: relative; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { display: none; }
.toggle-track {
    display: block;
    width: 48px; height: 26px;
    background: var(--border);
    border-radius: 13px;
    transition: background 0.2s;
    position: relative;
}
.toggle-switch input:checked ~ .toggle-track { background: var(--accent); }
.toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked ~ .toggle-track .toggle-thumb { transform: translateX(22px); }
.limit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.limit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    min-height: 42px;
}
.limit-btn input { display: none; }
.limit-btn.selected {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(232,48,74,0.08);
}

/* ── Todeskarte ──────────────────────────────────────────────── */
.death-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: #000;
    display: flex; align-items: center; justify-content: center;
}
.death-inner {
    display: flex; flex-direction: column;
    align-items: center; gap: 28px; padding: 40px 24px;
}
.death-card-wrap {
    width: 160px; height: 220px;
    border-radius: 16px;
    cursor: pointer;
    will-change: transform;
    box-shadow: 0 0 60px rgba(232,48,74,0.4);
}
.death-card-back, .death-card-front {
    width: 100%; height: 100%;
    border-radius: 16px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
}
.death-card-back {
    background: #0a0a0a;
    border: 2px solid #e8304a;
    position: relative; overflow: hidden;
}
.death-back-pattern {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(232,48,74,0.06) 0px, rgba(232,48,74,0.06) 2px,
        transparent 2px, transparent 12px
    );
}
.death-back-skull {
    font-size: 64px; position: relative; z-index: 1;
    animation: skullFloat 2s ease-in-out infinite;
}
@keyframes skullFloat {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.death-card-front {
    background: #0a0a0a;
    border: 2px solid #e8304a;
}
.death-skull-big { font-size: 72px; animation: bangPop 0.4s cubic-bezier(0.17,0.89,0.32,1.27); }
.death-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900; font-size: 18px;
    color: #e8304a; letter-spacing: 0.1em;
    text-transform: uppercase;
}
.death-sub {
    font-size: 13px; color: rgba(255,255,255,0.5);
    text-align: center; line-height: 1.4;
}
.death-ok { max-width: 300px; }

@keyframes deathShake {
    0%,100% { transform: translateX(0) rotate(0); }
    20%     { transform: translateX(-8px) rotate(-2deg); }
    40%     { transform: translateX(8px)  rotate(2deg); }
    60%     { transform: translateX(-6px) rotate(-1deg); }
    80%     { transform: translateX(6px)  rotate(1deg); }
}
.death-shake { animation: deathShake 0.5s ease; }

/* ── Case Opening ────────────────────────────────────────────── */
.case-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.case-viewport {
    width: 330px;
    height: 110px;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: #080f18;
}
.case-strip {
    display: flex;
    flex-direction: row;
    gap: 4px;
    height: 100%;
    will-change: transform;
    padding: 0 2px;
}
.case-item {
    width: 106px;
    flex-shrink: 0;
    height: 100%;
    border-radius: 6px;
    border: 2px solid var(--item-color, #444);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
    background: #0c1a25;
    transition: border-color 0.3s;
}
.case-item-bg {
    position: absolute;
    inset: 0;
    background: var(--item-color, #444);
    opacity: 0.08;
}
.case-item-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 15px;
    color: #fff;
    text-align: center;
    position: relative;
    z-index: 1;
    line-height: 1.1;
}
.case-item-rarity {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
    opacity: 0.8;
}
.case-item-winner {
    border-width: 3px;
    animation: caseWin 0.4s cubic-bezier(0.17,0.89,0.32,1.27);
}
.case-item-winner .case-item-bg { opacity: 0.2; }
@keyframes caseWin {
    0%   { transform: scale(0.95); }
    60%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

/* Pointer arrows on left and right of center */
.case-pointer-left,
.case-pointer-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    z-index: 10;
}
.case-pointer-left {
    left: calc(50% - 53px - 8px);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 12px solid #e8304a;
}
.case-pointer-right {
    left: calc(50% + 53px - 4px);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 12px solid #e8304a;
}
/* Fade edges */
.case-viewport::before,
.case-viewport::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    z-index: 5;
    pointer-events: none;
}
.case-viewport::before {
    left: 0;
    background: linear-gradient(to right, #080f18, transparent);
}
.case-viewport::after {
    right: 0;
    background: linear-gradient(to left, #080f18, transparent);
}

/* ── Blackjack & Higher/Lower ────────────────────────────────── */
.bj-wrap, .hl-wrap {
    display: flex; flex-direction: column;
    align-items: center; gap: 14px; width: 100%;
}
.bj-area { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.bj-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.bj-hand  { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.bj-value { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; color: var(--accent); }

.bj-card {
    width: 56px; height: 80px;
    background: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 900;
    box-shadow: 0 3px 12px rgba(0,0,0,0.5);
    animation: cardDeal 0.25s cubic-bezier(0.17,0.89,0.32,1.27);
}
.bj-hidden .bj-card-back {
    width: 100%; height: 100%;
    border-radius: 8px;
    background: #1a237e;
    background-image: repeating-linear-gradient(
        45deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 8px
    );
}
@keyframes cardDeal {
    from { transform: scale(0.7) translateY(-10px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.bj-actions, .hl-actions {
    display: flex; gap: 12px;
}
.bj-btn {
    padding: 12px 28px;
    border: none; border-radius: 10px;
    font-family: 'Barlow', sans-serif;
    font-size: 16px; font-weight: 800;
    cursor: pointer; min-height: 48px;
    transition: transform 0.15s;
}
.bj-btn:active { transform: scale(0.95); }
.bj-hit   { background: #10b981; color: #fff; }
.bj-stand { background: #e8304a; color: #fff; }

/* Higher or Lower */
.hl-current  { display: flex; align-items: center; gap: 16px; }
.hl-question { font-size: 15px; color: var(--text-muted); text-align: center; }
.hl-arrow    { font-size: 32px; font-weight: 900; color: #f59e0b; }

/* ── Reaktionstest ───────────────────────────────────────────── */
.rt-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.rt-circle {
    width: 160px; height: 160px;
    border-radius: 50%;
    background: #1a1a2e;
    border: 4px solid #333;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.rt-circle:active { transform: scale(0.95); }
.rt-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px; font-weight: 900;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    pointer-events: none;
}
.rt-circle.rt-active {
    background: #10b981;
    border-color: #34d399;
    box-shadow: 0 0 40px rgba(16,185,129,0.6);
    animation: rtPulse 0.3s ease;
}
.rt-circle.rt-active .rt-text { color: #fff; font-size: 26px; }
.rt-circle.rt-success {
    background: #10b981; border-color: #34d399;
}
.rt-circle.rt-fail, .rt-circle.rt-tooearly {
    background: #e8304a; border-color: #ff4d6a;
}
.rt-circle.rt-fail .rt-text,
.rt-circle.rt-tooearly .rt-text,
.rt-circle.rt-success .rt-text { color: #fff; }

@keyframes rtPulse {
    0%   { transform: scale(0.92); }
    60%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}
.rt-hint { font-size: 14px; color: var(--text-muted); text-align: center; }



/* ── Sniper ──────────────────────────────────────────────────── */
.sniper-wrap  { width: 100%; display: flex; justify-content: center; }

.sniper-screen {
    position: relative;
    width: 300px; height: 300px;
    background: rgba(8,18,12,0.97);
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(232,48,74,0.2);
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.sniper-players { position: absolute; inset: 0; z-index: 1; }

.sniper-player-label {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: none;
    color: rgba(255,255,255,0.3);
    transition: color 0.15s, filter 0.15s;
}

.stick-figure {
    width: 20px; height: 30px;
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), color 0.15s;
}

.stick-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: color 0.15s;
}

/* Active: scanning over this player */
.sniper-player-label.sniper-label-active {
    color: rgba(255,255,255,0.8);
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.4));
}

/* Locked: target acquired */
.sniper-player-label.sniper-label-locked {
    color: #e8304a;
    filter: drop-shadow(0 0 6px rgba(232,48,74,0.8));
    animation: labelPulse 0.35s ease infinite alternate;
}

/* Hit: stick figure falls, turns red */
.sniper-player-label.sniper-label-hit {
    color: #e8304a;
    filter: drop-shadow(0 0 8px rgba(232,48,74,1));
}
.sniper-label-hit .stick-figure { color: #e8304a; }
.stick-figure.stick-dead {
    transform: rotate(90deg) translateX(8px);
}

@keyframes labelPulse {
    from { opacity: 0.6; }
    to   { opacity: 1; }
}

.sniper-scope {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 2; pointer-events: none;
}

.sniper-hud {
    position: absolute; bottom: 44px;
    left: 0; right: 0; text-align: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10px; font-weight: 700;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.18em; text-transform: uppercase;
    z-index: 3; pointer-events: none;
    transition: color 0.3s;
}

.sniper-flash {
    position: absolute; inset: 0;
    background: #fff; opacity: 0;
    z-index: 10; pointer-events: none;
    border-radius: 50%; transition: opacity 0.04s;
}
.sniper-flash-active { opacity: 0.95; }


/* ── Animated Background Canvas ──────────────────────────────── */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}