/* --- Game Layout --- */
.game-area {
    display: flex;
    flex-direction: column;
    /* Fill the remaining height of the fixed app shell */
    height: 100%; 
    width: 100%;
    max-width: 800px; 
    margin: 0 auto;
    
    /* Distribute vertical space */
    justify-content: space-between; 
    gap: 1rem;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    flex-shrink: 0; 
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-track {
    flex: 1;
    height: 14px;
    background-color: white;
    border: var(--border-width) solid var(--border-subtle);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--c-blue);
    border-right: 2px solid var(--border-color);
    border-radius: 0;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 800;
    color: var(--text-main);
    font-size: var(--fs-sm);
    min-width: 70px;
    text-align: right;
}

/* --- Question Card --- */
.question-container {
    display: flex;
    justify-content: center;
    /* Allow shrinking if vertical space is tight */
    flex-shrink: 1; 
    min-height: 0; 
}

.question-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: var(--border-width) solid var(--border-subtle);
    /* Solid Shadow */
    box-shadow: 0 8px 0 var(--border-subtle);
    width: 100%;
    
    /* Use flex to center content vertically */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Dynamic padding based on screen height */
    padding: clamp(1rem, 4vh, 3rem) 1rem; 
    
    /* Allow it to be smaller on mobile landscapes */
    min-height: 120px; 
}

.q-symbol {
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-align: center;
}

.font-syllabic { font-family: var(--font-syllabic); font-size: var(--fs-syl-hero); }

/* NEW: For "Rows" mode where we show 5 chars at once. 
   Scales down to fit mobile width. */
.font-syllabic-long {
    font-family: var(--font-syllabic);
    font-size: clamp(2rem, 5vw, 3rem); /* Smaller max size */
    word-break: break-word;
}

.font-english { font-family: var(--font-english); font-size: var(--fs-eng-hero); }

/* Placeholder Circle Logic */
.syllabic-placeholder {
    color: var(--text-muted); /* Grey */
    font-weight: 400; /* Lighter weight if desired, or keep inherited */
    margin-right: 0.05em; /* Tiny gap */
}

.q-instruction {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Options Grid --- */
.options-container {
    /* Take up all remaining space */
    flex-grow: 1; 
    
    display: grid;
    gap: var(--gap-md);
    
    /* Match width of Question Card */
    width: 100%;
    
    /* Stack Vertically (1 Column) */
    grid-template-columns: 1fr;
    
    /* CRITICAL: Force rows to split available height equally */
    grid-auto-rows: 1fr;
    
    /* Center content */
    align-content: center;
    
    /* Removed max-width to allow full stretch matching question card */
    margin: 0 auto; 
}

/* --- Option Button --- */
.option-btn {
    appearance: none;
    background-color: var(--bg-surface);
    border: var(--border-width) solid var(--border-subtle);
    /* Solid Shadow */
    box-shadow: 0 6px 0 var(--border-subtle);
    border-radius: var(--radius-md);
    
    /* Fill the grid cell entirely */
    width: 100%;
    height: 100%;
    
    font-weight: 800;
    color: var(--text-main);
    cursor: pointer;
    text-align: center;
    position: relative;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Minimum touch target */
    min-height: 60px;
    
    transform: translateZ(0);
    transition: transform 0.1s, box-shadow 0.1s, background-color 0.1s, border-color 0.1s;
}

.font-english-btn { font-family: var(--font-english); font-size: var(--fs-eng-display); }
.font-syllabic-btn { font-family: var(--font-syllabic); font-size: var(--fs-syl-display); line-height: 1; }

/* Hover: Blue Stroke -> Blue Shadow */
@media (hover: hover) {
    .option-btn:hover:not(:disabled) {
        background-color: var(--c-grey-50);
        border-color: var(--c-blue);
        transform: translateY(-2px);
        box-shadow: 0 8px 0 var(--c-blue); 
    }
}

.option-btn:active:not(:disabled) {
    transform: translateY(6px);
    box-shadow: 0 0 0 var(--border-subtle); 
}

.option-btn:disabled {
    cursor: default;
    opacity: 1; 
    pointer-events: none;
    background-color: var(--c-grey-50);
    color: var(--c-grey-400);
    border-color: var(--c-grey-300);
    box-shadow: 0 0 0 var(--c-grey-300); 
    transform: translateY(6px); 
}

/* Feedback */
.option-btn.correct {
    background-color: var(--c-green) !important;
    color: white !important;
    border-color: #004d20 !important;
    opacity: 1 !important;
    transform: translateY(6px) !important;
    box-shadow: 0 0 0 #004d20 !important;
}

/* When correct, ensure the text and placeholder inside are white */
.option-btn.correct .syllabic-placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.option-btn.wrong {
    background-color: #E12D39 !important; 
    color: white !important;
    border-color: #8a1c23 !important; 
    opacity: 1 !important;
    transform: translateY(6px) !important;
    box-shadow: 0 0 0 #8a1c23 !important;
}

.option-btn.wrong .syllabic-placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Results styles were moved to styles.css to be shared with Intro view */

@media (max-width: 500px) {
    .options-container.grid-3 { grid-template-columns: 1fr; }
}