/* ============================================================
   Duell-Modus – ergänzt index.css (gleiche Palette & Bausteine)
   ============================================================ */

.duel-screen { display: none; }

.duel-center { text-align: center; }

/* ── Lobby ─────────────────────────────────────────────────── */
.duel-or {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 22px 0 14px;
}

.join-row {
    display: flex;
    gap: 10px;
}

.join-row .input-field { flex: 1; min-width: 0; }

.join-row .btn-secondary {
    width: auto;
    white-space: nowrap;
    font-size: 0.97rem;
    padding: 16px 22px;
}

.duel-back-wrap { margin-top: 18px; text-align: center; }

.duel-back {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.duel-back:hover { color: var(--primary); }

/* ── Warten ────────────────────────────────────────────────── */
.match-code {
    font-family: 'Fraunces', serif;
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--primary);
    margin: 12px 0 16px;
}

.wait-text {
    color: var(--text-muted);
    line-height: 1.6;
}

.loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    animation: dotBlink 1.2s infinite both;
}

.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlink {
    0%, 80%, 100% { opacity: 0.25; }
    40%           { opacity: 1; }
}

.duel-cancel { margin-top: 22px; }

/* ── Spiel ─────────────────────────────────────────────────── */
.duel-timerbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 22px;
    margin-bottom: 12px;
}

.timer-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#duelTimer {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

#duelTimer.low {
    color: var(--error);
}

.grace-banner {
    background: var(--error);
    color: #ffffff;
    text-align: center;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 16px;
    margin-bottom: 16px;
    animation: gracePulse 1s infinite;
}

@keyframes gracePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.72; }
}

.duel-scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 12px 22px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.duel-vs {
    color: var(--accent);
    font-family: 'Fraunces', serif;
    font-style: italic;
}

#oppProgress {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
}

#duelQuestions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.duel-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

/* ── Countdown ─────────────────────────────────────────────── */
.countdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 67, 73, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', serif;
    font-size: 7rem;
    font-weight: 800;
    color: #ffffff;
    z-index: 1000;
}

/* ── Ergebnis ──────────────────────────────────────────────── */
.result-outcome {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 22px;
}

.result-outcome.win  { color: var(--success); }
.result-outcome.lose { color: var(--error); }
.result-outcome.draw { color: var(--accent); }

.result-scores {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.result-row {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text-main);
}

.result-row.you {
    border-color: var(--accent);
    background: rgba(249, 160, 119, 0.10);
}

.result-row .muted {
    color: var(--text-muted);
    font-weight: 500;
}

.result-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}
