/* Kenn ich! — Mobile-first Quiz Game */
:root {
    --bg: #0F172A; --bg-card: #1E293B; --bg-input: #0F172A;
    --text: #F1F5F9; --text-muted: #94A3B8; --text-dim: #64748B;
    --border: #334155;
    --green: #10B981; --green-glow: rgba(16, 185, 129, .25);
    --red: #EF4444; --red-glow: rgba(239, 68, 68, .25);
    --blue: #3B82F6; --yellow: #F59E0B; --pink: #EC4899;
    --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg); color: var(--text);
    margin: 0; padding: 0; min-height: 100dvh;
    display: flex; flex-direction: column;
}

/* Layout */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 16px; flex: 1; }
.screen { display: none; flex-direction: column; min-height: calc(100dvh - 60px); }
.screen.active { display: flex; }

/* Header */
.app-header {
    background: var(--bg-card); padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.app-header h1 { font-size: 20px; margin: 0; }
.app-header h1 span { color: var(--green); }
.user-badge {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-muted);
}
.avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: #fff;
}

/* Cards */
.card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 16px; margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: block; width: 100%; padding: 14px;
    border: none; border-radius: var(--radius); cursor: pointer;
    font-size: 16px; font-weight: 600; text-align: center;
    transition: transform .1s, background .2s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #059669; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-option {
    background: var(--bg-card); color: var(--text); border: 2px solid var(--border);
    margin-bottom: 10px; text-align: left; padding: 16px;
    font-size: 15px; line-height: 1.4;
}
.btn-option:hover { border-color: var(--text-muted); }
.btn-option.correct { border-color: var(--green); background: var(--green-glow); animation: pulse-green .4s; }
.btn-option.wrong { border-color: var(--red); background: var(--red-glow); animation: shake .4s; }
.btn-option.reveal { border-color: var(--green); opacity: .7; }
.btn-option:disabled { pointer-events: none; }

/* Login */
.login-wrap { display: flex; align-items: center; justify-content: center; flex: 1; }
.login-box { width: 100%; max-width: 360px; text-align: center; }
.login-box h2 { font-size: 40px; margin: 0 0 4px; }
.login-box p { color: var(--text-muted); margin: 0 0 24px; }
.input {
    width: 100%; padding: 14px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); font-size: 16px; margin-bottom: 10px;
}
.input:focus { outline: none; border-color: var(--green); }
.error-text { color: var(--red); font-size: 13px; margin: 8px 0; }

/* Round list */
.round-card { display: flex; justify-content: space-between; align-items: center; }
.round-info h3 { margin: 0; font-size: 16px; }
.round-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.round-status { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.status-play { background: var(--green); color: #fff; }
.status-done { background: var(--border); color: var(--text-muted); }
.status-waiting { background: #78350F; color: #FCD34D; }

/* Quiz player */
.quiz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width .3s; }
.progress-text { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.streak-badge { color: var(--yellow); font-weight: 700; font-size: 14px; }

.question-category {
    font-size: 12px; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: .5px; margin-bottom: 8px;
}
.question-text { font-size: 20px; font-weight: 600; line-height: 1.4; margin-bottom: 20px; }

/* Logo blur */
.logo-container {
    width: 100%; aspect-ratio: 1; max-width: 280px; margin: 0 auto 16px;
    border-radius: var(--radius); overflow: hidden; background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.logo-container img {
    width: 80%; height: 80%; object-fit: contain;
    transition: filter .8s ease-out;
}
.blur-controls { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.blur-step {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
    background: var(--bg); color: var(--text-muted); font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.blur-step.active { border-color: var(--green); color: var(--green); }
.blur-step.used { background: var(--border); }

/* Feedback */
.feedback-card { text-align: center; padding: 24px 16px; }
.feedback-icon { font-size: 48px; margin-bottom: 8px; }
.feedback-points { font-size: 28px; font-weight: 700; color: var(--green); }
.feedback-brand { font-size: 14px; color: var(--text-muted); margin: 4px 0; }
.feedback-funfact {
    font-size: 13px; color: var(--text-muted); line-height: 1.5;
    background: var(--bg); padding: 12px; border-radius: 8px; margin-top: 12px;
    text-align: left;
}
.breakdown { display: flex; gap: 12px; justify-content: center; margin: 12px 0; font-size: 12px; color: var(--text-muted); }
.breakdown span { display: flex; flex-direction: column; align-items: center; }
.breakdown strong { font-size: 16px; color: var(--text); }

/* Leaderboard */
.lb-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border: none; }
.lb-rank { font-size: 18px; font-weight: 700; width: 28px; text-align: center; color: var(--text-dim); }
.lb-rank.gold { color: var(--yellow); }
.lb-rank.silver { color: #C0C0C0; }
.lb-rank.bronze { color: #CD7F32; }
.lb-name { flex: 1; font-weight: 500; }
.lb-score { font-weight: 700; color: var(--green); }

/* Animations */
@keyframes pulse-green { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 20px var(--green-glow)} }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }
@keyframes fade-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.fade-in { animation: fade-in .3s ease-out; }
