/* public/css/game.css */

/* === GLOBALE VARIABLEN === */
:root {
    --bg: #f3f4f6;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text: #1f2937;
    --border: #e5e7eb;
    --primary: #007bff;
    
    --font-family: system-ui, sans-serif;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 20px;
    color: #333; 
    min-height: 100vh;
    box-sizing: border-box;
    background-color: transparent; 
}

/* Fixierter Hintergrund */
body::before {
    content: "";
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    
    background-image: url('/assets/img/bg.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f4f4f9; 
}

h1, h2 { margin-top: 0; color: #333; }
a { text-decoration: none; }

/* === UEBUNG PAGE (Display Area) === */
#mainContainer { text-align: center; }

#displayArea {
    /* Layout */
    display: flex; 
    flex-direction: row !important; 
    flex-wrap: wrap;
    align-items: center; 
    justify-content: center;
    min-height: 250px; 
    
    gap: 0.6em; 
    row-gap: 1em; 
    padding: 40px 20px;
    margin-bottom: 20px; 
    
    /* Appearance */
    background-color: #ffffff !important; 
    color: #007bff; /* Fallback Farbe */
    border: 2px solid #007bff; 
    border-radius: 12px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    
    user-select: none;
    transition: none !important; 
}

/* Container für Wort-Blöcke */
.word-block {
    display: inline-flex; 
    gap: 0; 
    white-space: nowrap; 
}

/* === SEGMENTIERTER FORTSCHRITTSBALKEN (FULL WIDTH FIX) === */
#progressBar { 
    display: flex; 
    width: 100%;       /* Volle Breite */
    max-width: 100%;   /* Keine Einschränkung */
    height: 3px; 
    background-color: transparent; 
    border-radius: 0; 
    margin: 20px 0; 
    overflow: visible; 
    gap: 4px; 
    box-sizing: border-box; /* Padding/Border inkl. */
}

.progress-segment {
    flex: 1; 
    background-color: #e2e8f0; 
    border-radius: 4px;
    transition: background-color 0.3s ease;
    height: 100%; /* Füllt den Container */
}

.progress-segment.filled {
    background-color: #007bff; 
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.4);
}

/* === INFO & BUTTONS === */
#countDisplay { 
    font-weight: bold; 
    margin-bottom: 15px; 
    font-size: 1.2rem; 
    color: #555; 
}

.button-group-center { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    margin-top: 20px; 
}

#endScreen { 
    margin-top: 20px; 
    border-top: 1px solid #eee; 
    padding-top: 20px; 
}

/* Button override für Konsistenz */
.btn-result-action { 
    min-width: 200px; 
}

.hidden { display: none !important; }

/* === SILBEN FARBEN === */
#displayArea .syllable-1 { color: #007bff !important; }
#displayArea .syllable-2 { color: #dc3545 !important; }

/* === MOBILE === */
@media (max-width: 600px) {
    #displayArea { min-height: 200px; padding: 20px; }
}