/* Fixed dark theme (no light-mode toggle on this screen) - declared so
   the browser doesn't try to auto-invert colors on top of the page's own
   dark styling (e.g. Chrome's Force Dark Mode for Web Contents flag). */
:root { color-scheme: dark; }

body {
    background-color: #050505;
    color: #ffffff;
    font-family: system-ui, -apple-system, sans-serif;
}

#grid {
    display: flex;
    flex-direction: column-reverse; /* Row 0 starts at the bottom */
    background-color: #111;
    border: 6px solid #333;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    aspect-ratio: 10 / 12; /* Force the grid to stay in a 10x12 proportion */
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

.grid-row {
    display: flex;
    flex-direction: row;
    flex: 1;
    width: 100%;
    min-height: 0;
}

.grid-cell {
    flex: 1;
    transition: all 0.1s ease-in-out;
}

.color-0 { background-color: #FF0000; box-shadow: inset 0 0 10px rgba(255,255,255,0.5); border: 2px solid #050505; }
.color-1 { background-color: #00FF00; box-shadow: inset 0 0 10px rgba(255,255,255,0.5); border: 2px solid #050505; }
.color-2 { background-color: #FFFF00; box-shadow: inset 0 0 10px rgba(255,255,255,0.5); border: 2px solid #050505; }
.color-3 { background-color: #00FFFF; box-shadow: inset 0 0 10px rgba(255,255,255,0.5); border: 2px solid #050505; }
.color-4 { background-color: #FF00FF; box-shadow: inset 0 0 10px rgba(255,255,255,0.5); border: 2px solid #050505; }

.color-empty { background-color: transparent; border: 2px dashed #555; }

.high-contrast-focus:focus {
    outline: none;
    border-color: #00FFFF;
    box-shadow: 0 0 0 6px rgba(0, 255, 255, 0.4);
}

@keyframes flash-clear {
    0% { background-color: #FFF; transform: scale(1.05); }
    100% { background-color: transparent; transform: scale(1); }
}
.flash-row .grid-cell {
    animation: flash-clear 0.3s ease-out forwards;
}

@keyframes flash-correct-anim {
    0% { border-color: #4ade80 !important; box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.5) !important; }
}
@keyframes flash-incorrect-anim {
    0% { border-color: #f87171 !important; box-shadow: 0 0 0 8px rgba(248, 113, 113, 0.5) !important; }
}
.input-flash-correct, .input-flash-correct:focus {
    animation: flash-correct-anim 0.5s ease-out !important;
}
.input-flash-incorrect, .input-flash-incorrect:focus {
    animation: flash-incorrect-anim 0.5s ease-out !important;
}

/* Shared TTS Option container for consistency */
.tts-container {
    background-color: #111827; /* gray-900 */
    border: 4px solid #4B5563; /* gray-600 */
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Matches the CoA Apps site's own .back-link styling (same green, same
   underline-on-hover behavior), without pulling in the whole site
   stylesheet and its unrelated rules into the game's own visual system. */
.back-link-game {
    display: inline-block;
    color: #4ade80;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
}
.back-link-game:hover,
.back-link-game:focus-visible {
    text-decoration: underline;
    outline: 3px solid #00FFFF;
    outline-offset: 2px;
}

/* Small bottom-of-screen utility link (privacy policy) */
.footer-link {
    color: #9ca3af;
    text-decoration: underline;
    font-size: 14px;
}
.footer-link:hover,
.footer-link:focus-visible {
    color: #ffffff;
}
