/* ═══════════════════════════════════════════════════════════════
   app.css – Premium Dark Design System
   Videospiel Rezensionen Quiz
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variablen ───────────────────────────────────────────── */
:root {
    /* Hintergründe */
    --bg-base:     #09090e;
    --bg-card:     #0e1016;
    --bg-elevated: #131720;
    --bg-input:    #07080b;
    --bg-hover:    #111825;

    /* Akzent */
    --blue:        #66c0f4;
    --blue-dim:    #1a3f5c;
    --blue-glow:   rgba(102, 192, 244, 0.12);
    --blue-hover:  #8ecdf7;

    /* Rahmen */
    --border-sm:   rgba(255, 255, 255, 0.05);
    --border-md:   #1a2336;
    --border-lg:   #28374d;

    /* Text */
    --text-1:      #dce8f4;
    --text-2:      #6b7d90;
    --text-3:      #374455;

    /* Status */
    --green:       #a4d007;
    --green-2:     #c8f000;
    --red:         #e06c75;
    --red-dark:    #b93b3b;
    --amber:       #f4c542;
}

/* ── Basis ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--bg-base);
    font-family: sans-serif;
    color: var(--text-1);
}

/* Textauswahl */
::selection { background-color: var(--blue); color: var(--bg-base); }

/* Scrollbar – schlank und subtil */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-lg); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── Hintergrund-Gradient (Standard-Seiten) ──────────────────── */
.page-bg {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(15, 40, 80, 0.55) 0%, transparent 70%),
        var(--bg-base);
}

/* ── Animationen ─────────────────────────────────────────────── */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fade-in          { animation: fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}
.animate-shake { animation: shake 0.28s ease-in-out; }

@keyframes pop {
    0%   { transform: scale(0.85); opacity: 0; }
    55%  { transform: scale(1.06); }
    100% { transform: scale(1); opacity: 1; }
}
.animate-pop { animation: pop 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 192, 244, 0.35); }
    65%       { box-shadow: 0 0 0 10px rgba(102, 192, 244, 0); }
}
.animate-pulse-blue { animation: pulse-blue 2.2s infinite; }

@keyframes shimmer {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 1; }
}
.shimmer { animation: shimmer 1.8s ease-in-out infinite; }

@keyframes glow-pulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.8; }
}
.glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

@keyframes xp-fill { from { width: 0%; } }
.xp-bar-fill { animation: xp-fill 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

@keyframes countdown { from { width: 100%; } to { width: 0%; } }
.timer-bar {
    animation: countdown linear forwards;
    background: linear-gradient(to right, var(--blue), var(--blue-hover));
    height: 3px;
    border-radius: 2px;
}

/* ── Karten ──────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-sm);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.03);
}

.card-elevated {
    background: var(--bg-elevated);
    border: 1px solid var(--border-md);
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ── Formularelemente ────────────────────────────────────────── */
.app-input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-md);
    border-radius: 10px;
    color: var(--text-1);
    padding: 10px 12px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 13px;
}
.app-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}
.app-input::placeholder { color: var(--text-3); }
textarea.app-input { resize: vertical; }

/* ── Buttons ─────────────────────────────────────────────────── */
.app-btn {
    background: var(--blue);
    border-radius: 10px;
    color: #050a10;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(102, 192, 244, 0.2);
}
.app-btn:hover             { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102, 192, 244, 0.3); }
.app-btn:active            { transform: translateY(0); box-shadow: 0 2px 8px rgba(102, 192, 244, 0.15); }
.app-btn:disabled          { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.app-btn.red               { background: #7a1515; color: #ffaaaa; box-shadow: none; }
.app-btn.red:hover         { background: #9b1c1c; box-shadow: 0 4px 16px rgba(224, 108, 117, 0.2); }

/* ── Autocomplete ────────────────────────────────────────────── */
.suggestion-item:hover  { background-color: var(--bg-hover); color: #ffffff; }
.suggestion-item.active { background-color: var(--blue); color: var(--bg-base); }

/* ── Tabs (Sidebar für Admin / Moderator) ────────────────────── */
.tab-active {
    background-color: rgba(102, 192, 244, 0.08);
    color: var(--blue);
    border-left: 2px solid var(--blue);
}
.tab-inactive {
    color: var(--text-2);
    border-left: 2px solid transparent;
}
.tab-inactive:hover { background-color: rgba(255, 255, 255, 0.04); color: var(--text-1); }

/* ── Tabs (horizontal, Profil) ───────────────────────────────── */
.tab-btn { transition: color 0.15s, border-color 0.15s; }
.tab-btn.active         { color: var(--blue); border-bottom-color: var(--blue); }
.tab-btn:not(.active)   { color: var(--text-2); border-bottom-color: transparent; }
.tab-panel              { display: none; }
.tab-panel.active       { display: block; }

/* ── Stat-Karte ──────────────────────────────────────────────── */
.stat-card {
    background: linear-gradient(135deg, #0d1219 0%, #080b10 100%);
    border: 1px solid var(--border-sm);
}

/* ── Errungenschaften ────────────────────────────────────────── */
.achievement-locked { filter: grayscale(100%); opacity: 0.25; }

/* ── Multiplayer-Antwort-Buttons ─────────────────────────────── */
.answer-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-md);
    border-radius: 12px;
    color: var(--text-2);
    padding: 13px 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 14px;
}
.answer-btn:hover:not(:disabled) {
    border-color: var(--blue);
    color: var(--text-1);
    background: rgba(102, 192, 244, 0.06);
    box-shadow: inset 0 0 0 1px rgba(102, 192, 244, 0.1);
}
.answer-btn.correct  { border-color: var(--green) !important; background: rgba(164,208,7,0.07) !important; color: var(--green) !important; }
.answer-btn.wrong    { border-color: var(--red) !important; background: rgba(224,108,117,0.07) !important; color: var(--red) !important; }
.answer-btn:disabled { cursor: not-allowed; opacity: 0.75; }

/* ── Hilfklassen ─────────────────────────────────────────────── */
.hidden-section { display: none !important; }
.screen         { display: none; }
.screen.active  { display: flex; }

/* ── Navbar (globaler Stil) ──────────────────────────────────── */
.app-navbar {
    background: rgba(9, 9, 14, 0.85);
    border-bottom: 1px solid var(--border-sm);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ── Progress-Bar ────────────────────────────────────────────── */
.progress-track {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 99px;
    overflow: hidden;
}
.progress-fill {
    background: linear-gradient(to right, var(--blue), var(--blue-hover));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border-radius: 99px;
    box-shadow: 0 0 12px rgba(102, 192, 244, 0.35);
}

/* ── XP-Bar ──────────────────────────────────────────────────── */
.xp-track {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 99px;
    overflow: hidden;
}
.xp-fill {
    background: linear-gradient(to right, var(--green), var(--green-2));
    box-shadow: 0 0 10px rgba(164, 208, 7, 0.4);
    border-radius: 99px;
}

/* ── Badge-Stile ─────────────────────────────────────────────── */
.badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.badge-blue  { background: rgba(102,192,244,0.1); color: var(--blue); border: 1px solid rgba(102,192,244,0.18); }
.badge-green { background: rgba(164,208,7,0.1);   color: var(--green); border: 1px solid rgba(164,208,7,0.18); }
.badge-red   { background: rgba(224,108,117,0.1); color: var(--red);   border: 1px solid rgba(224,108,117,0.18); }
.badge-amber { background: rgba(244,197,66,0.1);  color: var(--amber); border: 1px solid rgba(244,197,66,0.18); }

/* ── Glow-Effekte (Premium-Touch) ────────────────────────────── */
.glow-blue  { box-shadow: 0 0 30px rgba(102, 192, 244, 0.15), 0 0 60px rgba(102, 192, 244, 0.05); }
.glow-sm    { box-shadow: 0 0 16px rgba(102, 192, 244, 0.12); }
.text-glow  { text-shadow: 0 0 20px rgba(102, 192, 244, 0.5); }

/* ── Loading-Spinner ─────────────────────────────────────────── */
.loading-screen {
    background: var(--bg-base);
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* ── Overlay / Modal-Backdrop ────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
}
.modal-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-md);
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
}
