/* apps/blitzquiz/public/css/game.css – GOLD STANDARD v1.0 */

/* === STATUS BAR === */
.status-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: bold;
    color: #64748b;
    font-size: 0.95rem;
}
.status-val { color: #3b82f6; }

/* === START BUTTON === */
.btn-start-game {
    display: block;
    margin: 40px auto;
    padding: 18px 50px;
    font-size: 1.4rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-start-game:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(59, 130, 246, 0.5); }

/* === FLASH CARD ===
   Feste Mindesthöhe: beide Zustände (Wortanzeige & Eingabe) sehen gleich groß aus.
   #inputArea wird mit display:none aus dem Layout entfernt (kein Layout-Platz belegt),
   daher zentriert sich das Wort korrekt vertikal. */
.flash-card {
    background: #fff;
    border: 2px solid #3b82f6;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
    padding: 30px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

/* Wortanzeige – vertikal zentriert (nur Element im Layout wenn Eingabe hidden) */
#wordDisplay {
    font-size: var(--card-font-size, 3rem);
    font-family: var(--app-font, sans-serif);
    font-weight: var(--app-font-weight, 400);
    text-align: center;
    line-height: 1.3;
    width: 100%;
}
#wordDisplay.hidden { display: none !important; }

/* Eingabe-Bereich – display:none nimmt keinen Platz weg */
#inputArea {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
/* Sanftes Einblenden wenn Eingabe erscheint */
#inputArea.active {
    animation: inputFadeIn 0.25s ease;
}
@keyframes inputFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
#userInput {
    width: 100%;
    padding: 14px 20px;
    /* Schriftgröße aus den Einstellungen (identisch zur Wortanzeige) */
    font-size: var(--card-font-size, 3rem);
    font-family: var(--app-font, sans-serif);
    font-weight: var(--app-font-weight, 400);
    text-align: center;
    border: 1px dotted #3b82f6;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
    line-height: 1.3;
    background-color: #3b82f61a;
}
#userInput:focus { border-color: #3b82f6; }
#userInput.input-correct { border-color: #22c55e; background: #f0fdf4; }
#userInput.input-wrong   { border-color: #ef4444; background: #fef2f2; }
#userInput::placeholder  { color: #cbd5e1; font-size: 0.6em; }

/* Prüfen-Button */
#checkBtn {
    padding: 12px 36px;
    font-size: 1.1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
#checkBtn:hover { background: #2563eb; }

/* === FEEDBACK === */
.result-display {
    padding: 10px 18px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}
.result-display.feedback-ok  { background: #f0fdf4; color: #15803d; }
.result-display.feedback-err { background: #fef2f2; color: #dc2626; }
.feedback-correct { color: #15803d; }
.feedback-wrong   { color: #dc2626; }

/* === FORTSCHRITTSLEISTE (segmentiert) === */
.progress-container { display: flex; gap: 4px; height: 8px; width: 100%; margin-top: 8px; border-radius: 4px; overflow: hidden; }
.segment { flex: 1; background: #e2e8f0; border-radius: 3px; transition: background-color 0.3s; }
.segment.correct { background: #22c55e; }
.segment.wrong   { background: #ef4444; }

/* === WIN SCREEN === */
.win-screen { padding: 10px 0; background-color: rgba(255, 255, 255, 0.8); border-radius: 15px; }
.win-title  { color: #15803d; margin-bottom: 6px; }
.fail-title { color: #dc2626; margin-bottom: 6px; }
.win-score  { font-size: 1.2rem; color: #64748b; margin-bottom: 20px; }

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.result-table th, .result-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}
.result-table thead tr { background: #f8fafc; }
.result-table .row-correct td:first-child { color: #22c55e; }
.result-table .row-wrong   td:first-child { color: #ef4444; }
.result-table .row-wrong td:nth-child(3) { color: #dc2626; }

.win-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Meisterprüfungs-Button – Gold */
.btn.btn-mastery {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn.btn-mastery:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

/* === ALLGEMEIN === */
.highscore-wrapper { margin-top: 40px; }

@media (max-width: 600px) {
    .flash-card { min-height: 200px; padding: 20px; }
}

/* === MOBILE === */
@media (max-width: 600px) {
    #displayArea { 
        min-height: 200px; 
        padding: 20px; 
        
        /* Hier trägst du deine gewünschte fixe Größe ein */
        font-size: 0.5rem !important; 
    }

    /* Stellt sicher, dass das Wort auf dem Handy nicht in der Mitte umbricht */
    .word-block {
        white-space: nowrap; 
    }
}