/* --- START OF FILE game.css --- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* === Base Layout === */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Keep touch-action from inline style */
  touch-action: pan-y;
}

button {
  /* Keep touch-action from inline style */
  touch-action: manipulation;
}

/* --- Main App Structure (Game-specific adjustments/elements) --- */
.app-container {
    /* Base styles remain in index.html, add game-specific overrides here if needed */
    /* Example: */
    /* border: 3px solid #FFD700; /* Moved border for context */
    position: relative; /* Needed for absolute positioned children like buttons */
    display: none; /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    /* backdrop-filter: blur(5px); */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 20px;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); */
    width: 90%;
    max-width: 700px;
    margin-bottom: 0; /* Removed margin, included in height calc */
    /* Dynamic height calculation considering progress bar, keyboard, and previous margin */
    max-height: calc(100vh - var(--progress-bar-height, 0px) - var(--keyboard-height, 0px) - 50px); /* Subtract the 50px margin */
    /* overflow-y: auto; */
    overflow-y: hidden;
}

.main-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.main-left {
    padding: 10px;
    align-self: center;
    filter: drop-shadow(2px 3px 3px rgba(0, 0, 0, 0.3));
}

.main-right {
    padding: 10px;
    overflow: hidden;

}

/* --- Global Buttons (Positioned outside App Container) --- */
.top-bar-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0);
    z-index: 1000;
}

.top-bar-controls button {
    font-size: 1.1em;
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.top-bar-controls button:hover {
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    @keyframes bounceIn {
         0% { opacity: 0; transform: scale(0.5) translateY(-50px); }
         60% { opacity: 1; transform: scale(1.1) translateY(10px); }
         80% { transform: scale(0.95) translateY(0); }
         100% { opacity: 1; transform: scale(1) translateY(0); }
    }

    /* --- Prevent double-tap zoom --- */
    body {
      touch-action: pan-y;
    }

    button {
      touch-action: manipulation;
    }

/* Remove old absolute positioning */
/* NEW Positioning: Outside bottom-right corner */
/* Adjust -15px / -20px as needed for desired distance */
/* Removed */
/* Removed */
/* Removed */

/* Hover styles apply only to settings button in top bar */
#settings-btn:hover {
    background-color: #c5e2e3;
    color: white;
    transform: scale(1.1); /* Keep hover effect */
    /* Ensure hover doesn't change position */
}
#toggle-music-btn.music-off { background-color: #FF6347; border-color: #DC143C; color: white; }
/* Optional: Add a specific hover color for home if desired */
/* #home-btn:hover { background-color: #ffcc80; } */

/* --- Base styles for common buttons in the game grid --- */
.check-next-controls button {
    padding: 0 15px;
    font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.2rem); /* Adaptive font size */
    cursor: pointer;
    border: none;
    border-radius: 30px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease-out, visibility 0s linear 0.3s;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    position: relative;
    top: 0;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- Styling for Hidden Game Buttons --- */
.check-next-controls button.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-out, visibility 0s linear 0.3s;
    box-shadow: none;
}

/* --- Play Again Button Style --- */
#play-again-btn,
#submit-report-btn,
#download-report-btn {
     padding: 14px 20px;
     font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem) !important;
     cursor: pointer;
     border: none;
     border-radius: 30px;
     transition: all 0.25s ease;
     font-weight: bold !important;
     font-family: 'Comic Sans MS', sans-serif !important;
     box-shadow: 0 4px 8px rgba(0,0,0,0.15);
     position: relative;
     top: 0;
     display: inline-flex; /* Use inline-flex */
     justify-content: center;
     align-items: center;
     line-height: 1.2;
     margin-top: 0px; margin-left: 8px; margin-right: 8px;
     background: #FF4500; color: white;
}


/* --- Disabled States for Game Buttons --- */
.check-next-controls button:disabled,
#play-again-btn:disabled,
#submit-report-btn:disabled,
#download-report-btn:disabled {
    opacity: 0.6 !important;
    visibility: visible !important;
    cursor: not-allowed;
    box-shadow: none;
    background: #E0E0E0 !important;
    color: #999 !important;
    transform: none !important;
    pointer-events: none !important;
}

/* --- Hover States (only if not disabled/hidden) --- */
.check-next-controls button:not(:disabled):not(.hidden):hover,
#play-again-btn:not(:disabled):hover,
#submit-report-btn:not(:disabled):hover,
#download-report-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0,0,0,0.2);
}
/* --- Active States (only if not disabled/hidden) --- */
.check-next-controls button:not(:disabled):not(.hidden):active,
#play-again-btn:not(:disabled):active,
#submit-report-btn:not(:disabled):active,
#download-report-btn:not(:disabled):active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    filter: brightness(0.95);
}


/* --- Specific Game Button Colors --- */
#play-word-btn { background-color: #1E90FF; color: white; }
#check-btn { background: linear-gradient(45deg, #FFD700, #FFA500); color: #4B0082; }
#idk-btn { background-color: red; color: white; }
#next-word-btn { background: linear-gradient(45deg, #90EE90, #32CD32); color: #006400; }

/* --- Font size adjustments for #play-word-btn states --- */
#play-word-btn.button-state-loading,
#play-word-btn.button-state-listening {
    font-size: 0.95em; /* Slightly smaller font size */
}

 /* --- Input/Feedback/Visuals --- */
 #feedback, #feedback-spelling { /* Apply base styles to both */
    margin: 0px 0 0px 0; /* Adjust margin as needed */
    font-weight: 700;
    min-height: 1.4em;
    font-size: clamp(1.5em, 1.2em + 1.5vw, 2.5em); /* Adaptive font size */
    line-height: 1.3;
    text-align: center;
    transition: all 0.3s ease;
    color: #4B0082; /* Default/Info color */
    width: 100%;
 }
 /* Specific style for translation feedback (original #feedback) */
 #feedback {
     font-family: 'LXGW WenKai Mono TC', 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', sans-serif; /* Font for Chinese */
 }
 /* Specific style for spelling feedback */
 #feedback-spelling {
     font-size: clamp(2em, 0.1em + 1.5vw, 2em) !important; /* Adaptive font size */
     /* Keep default font or specify spelling font if different */
 }

 #feedback small, #feedback-spelling small { /* Apply to both if small is used */
    /* font-size: 0.6em;  */
    font-size: clamp(1.5em, 1.2em + 1.5vw, 2.5em); /* Adaptive font size */
    color: #555;
    display: block;
    margin-top: 5px;
 }
/* Feedback State Classes (Apply to both) */
#feedback.correct, #feedback-spelling.correct { color: #2E8B57; }
#feedback.incorrect, #feedback-spelling.incorrect { color: #DC143C; }
#feedback.loading, #feedback-spelling.loading { color: #4682B4; }
#feedback.info, #feedback-spelling.info { color: #4682B4; } /* Reusing loading color for info */
#feedback .skipped, #feedback-spelling .skipped { color: #FF8C00; font-weight: bold; } /* Style for skipped word itself inside feedback */
#feedback.skipped-feedback, #feedback-spelling.skipped-feedback { color: #6A5ACD; } /* Style for the feedback message when skipped */

/* Placeholder for potential word images */
#word-image-placeholder {
    min-height: 0px; /* Adjust if you expect images */
    margin-bottom: 15px;
    width: 100%;
    /* Add styles for image display if you implement this */
    /* e.g., text-align: center; */
}

/* User input display area - Make it a positioning context */
#input-display {
    position: relative; /* Needed for absolute positioning of the overlay */
    border: 3px dashed #87CEFA;
    padding: 15px;
    margin: 15px 0;
    line-height: 1.2;
    background-color: #F0F8FF;
    border-radius: 15px;
    letter-spacing: 8px; /* Adjust spacing */
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
    color: #4682B4;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    width: 100%;
    text-align: center;
    box-sizing: border-box; /* Include padding/border in width */
    white-space: nowrap; /* Prevent text wrapping */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    overflow-y: auto;
    font-size: clamp(1.2em, 0.9em + 1.5vw, 2em); /* Reduced font size */
    line-height: 1.2;
    letter-spacing: 8px;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    color: #4682B4; /* Default color for correct letters in overlay */
    min-height: clamp(1.2em + 34px, 0.9em + 1.5vw + 28px, 2em + 28px);
}

/* Overlay for displaying colored feedback on top of textarea */
#input-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: inherit; /* Match parent's padding */
    margin: 0; /* Reset margin */
    border: none; /* No border for overlay */
    background: transparent; /* See through to textarea */
    color: transparent; /* Make base text transparent, only spans show */
    pointer-events: none; /* Allow clicks to pass through to textarea */
    z-index: 2; /* Position above textarea */
    /* Ensure text properties match input-display/textarea */
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    font-family: inherit;
    text-align: inherit;
    word-break: break-all; /* Match parent */
    box-sizing: border-box; /* Match parent */
    white-space: pre-wrap; /* Preserve whitespace like textarea */
}


/* Style for incorrectly typed letters in Translate It mode (within the overlay) */
#input-overlay .incorrect-letter {
    color: #DC143C; /* Crimson red */
    /* Optional: Add subtle background or underline */
    /* background-color: rgba(255, 0, 0, 0.1); */
    /* text-decoration: underline wavy red; */
}


/* --- Grid Layout for Game Buttons --- */
 .check-next-controls {
    display: grid; /* Controlled by JS (grid/none) */
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto; /* Two rows */
    gap: 12px;
    justify-items: stretch; /* Stretch horizontally */
    align-items: stretch; /* Stretch vertically */
}
 /* Assign buttons to grid areas */
 #play-word-btn { grid-area: 1 / 1 / 2 / 2; } /* Row 1, Col 1 */
 #idk-btn { grid-area: 1 / 2 / 2 / 3; }       /* Row 1, Col 2 */
 #check-btn { grid-area: 2 / 1 / 3 / 2; }     /* Row 2, Col 1 */
 #next-word-btn { grid-area: 2 / 2 / 3 / 3; } /* Row 2, Col 2 */

/* --- Progress Bar --- */
.progress-container {
    width: 90%;
    max-width: 700px; /* Match app container max-width perhaps */
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    margin: 0 auto 10px auto;
    height: 28px;
    overflow: hidden;
    border: 2px solid #4682B4;
    position: fixed; /* Fixed at the top */
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: none; /* Controlled by JS */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
#progress-bar {
    width: 0%; /* Controlled by JS */
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF8C00);
    border-radius: 13px; /* Slightly smaller than container */
    transition: width 0.4s ease-out;
    position: relative;
    z-index: 2;
    overflow: hidden;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2);
}
#progress-text-completed,
#progress-text-remaining {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    padding: 0 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}
#progress-text-completed {
    /* Positioned within the colored bar */
    right: 0;
    color: white;
    text-align: right;
    z-index: 3; /* Above the bar */
}
#progress-text-remaining {
    /* Positioned within the container, visible when bar is not full */
    right: 0;
    color: #4B0082;
    text-align: right;
    z-index: 1; /* Below the bar */
}

 /* --- Container for end-game buttons --- */
 #end-game-controls {
     display: none; /* Controlled by JS */
     margin-top: 0px;
     justify-content: center;
     flex-wrap: wrap;
     gap: 15px;
     min-height: 60px; /* Reserve space */
     width: 100%; /* Take full width for centering */
     align-items: center;
 }

/* --- Settings Modal Styles --- */
#settings-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Controlled by JS */
    justify-content: center; align-items: center;
    z-index: 150;
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.settings-modal-content {
    background: #fff; padding: 30px 40px; border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
    width: 90%; max-width: 400px;
    text-align: center; position: relative;
    border: 3px solid #4682B4;
}
#close-modal-btn {
    position: absolute; top: 10px; right: 15px;
    font-size: 1.8em; cursor: pointer; color: #aaa;
    line-height: 1; border: none; background: none; padding: 0;
}
#close-modal-btn:hover { color: #666; }
.settings-modal-content h2 { color: #4682B4; margin-top: 0; margin-bottom: 20px; }
.settings-modal-content label { display: block; margin: 15px 0 5px 0; font-weight: bold; color: #333; }
.settings-modal-content input[type="password"],
.settings-modal-content input[type="number"] {
    width: 80%; padding: 10px 15px; font-size: 1.1em;
    border-radius: 8px; border: 2px solid #ccc; margin-bottom: 10px;
    font-family: inherit; text-align: center; box-sizing: border-box;
}
.settings-modal-content input[type="number"] { width: 100px; } /* Specific width for number input */
.settings-modal-content button {
    padding: 12px 25px; font-size: 1em; cursor: pointer; border: none;
    border-radius: 20px; transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold; margin-top: 15px; margin-left: 5px; margin-right: 5px;
}
#submit-password-btn { background-color: #1E90FF; color: white; }
#save-settings-btn { background-color: #32CD32; color: white; }
#clear-info-btn { background-color: #FF8C00; color: white; }
#submit-password-btn:hover, #save-settings-btn:hover, #clear-info-btn:hover { filter: brightness(1.1); }
#submit-password-btn:active, #save-settings-btn:active, #clear-info-btn:active { transform: scale(0.98); }
#password-prompt p { margin-bottom: 10px; color: #555; }
#settings-area { display: none; padding-top: 10px; border-top: 1px solid #eee; margin-top: 15px; }
#settings-area > div { margin-bottom: 15px; } /* Spacing within settings area */
#settings-feedback { min-height: 1.2em; margin-top: 15px; font-weight: bold; }
.settings-error { color: #DC143C; }
.settings-success { color: #2E8B57; }

/* Style for music toggle button INSIDE the settings modal */
#settings-modal #toggle-music-btn {
    display: block;
    width: 80%;
    margin: 10px auto 10px auto;
    padding: 10px 20px;
    font-size: 1.0em;
    cursor: pointer;
    border: none;
    border-radius: 20px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold;
    background-color: #20B2AA; /* Teal */
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-align: center;
}
#settings-modal #toggle-music-btn:hover {
    background-color: #009688; /* Darker teal */
    filter: brightness(1.1);
    transform: none;
}
#settings-modal #toggle-music-btn:active {
    transform: scale(0.98);
}
#settings-modal #toggle-music-btn.music-off {
    background-color: #FF6347; /* Tomato */
    color: white;
}
#settings-modal #toggle-music-btn.music-off:hover {
    background-color: #E55337;
}

/* Style for Home button INSIDE the settings modal */
#settings-modal #home-btn {
    display: block; /* Make it a block element */
    width: 80%; /* Match password input width */
    margin: 10px auto 10px auto; /* Center it with some margin */
    padding: 10px 20px; /* Slightly smaller padding than admin button */
    font-size: 1.0em; /* Slightly smaller font */
    cursor: pointer;
    border: none;
    border-radius: 20px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold;
    background-color: #FFA07A; /* Light Salmon */
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    /* Remove inherited styles if necessary */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-align: center; /* Ensure text is centered */
}
#settings-modal #home-btn:hover {
    background-color: #FA8072; /* Salmon */
    filter: brightness(1.1);
    transform: none; /* Override top-bar hover transform */
}
#settings-modal #home-btn:active {
    transform: scale(0.98);
}


/* Style for the new Admin Settings button */
#show-admin-settings-btn {
    display: block; /* Make it a block element */
    width: 80%; /* Match password input width */
    margin: 20px auto 15px auto; /* Center it with some margin */
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    border: none;
    border-radius: 20px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold;
    background-color: #6A5ACD; /* Slate Blue */
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
#show-admin-settings-btn:hover {
    background-color: #7B68EE; /* Medium Slate Blue */
    filter: brightness(1.1);
}
#show-admin-settings-btn:active {
    transform: scale(0.98);
}

/* --- Skip Confirmation Modal Styles --- */
#skip-confirm-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Controlled by JS */
    justify-content: center; align-items: center;
    z-index: 155; /* Above settings modal potentially */
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.skip-modal-content {
    background: #fff; padding: 30px 40px; border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
    width: 90%; max-width: 380px;
    text-align: center; position: relative;
    border: 3px solid #FF69B4; /* Distinct border color */
}
.skip-modal-content h2 { color: #FF69B4; margin-top: 0; margin-bottom: 15px; font-size: 1.4em; }
.skip-modal-content p { margin-bottom: 25px; color: #555; font-size: 1.1em; }
.skip-modal-content p strong { color: #4B0082; font-size: 1.1em; } /* Style for emphasis like 'skip' */
.skip-modal-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.skip-modal-buttons button {
    padding: 12px 25px; font-size: 1em; cursor: pointer; border: none;
    border-radius: 20px; transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold;
}
#confirm-skip-btn { background-color: #FF8C00; color: white; }
#cancel-skip-btn { background-color: #A9A9A9; color: white; }
#confirm-skip-btn:hover, #cancel-skip-btn:hover { filter: brightness(1.1); }
#confirm-skip-btn:active, #cancel-skip-btn:active { transform: scale(0.98); }
#close-skip-modal-btn { /* Same style as settings close button */
    position: absolute; top: 10px; right: 15px;
    font-size: 1.8em; cursor: pointer; color: #aaa;
    line-height: 1; border: none; background: none; padding: 0;
}
#close-skip-modal-btn:hover { color: #666; }

/* --- Game Animations (excluding bounceIn used by splash) --- */
@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}
.shake { /* Apply to input display on incorrect guess */
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

/* Pulse animation is used on splash button, keep in index.html */
/* @keyframes pulse { ... } */

@keyframes celebrate {
    0% { transform: scale(1); }
    30% { transform: scale(1.1) rotate(-3deg); }
    60% { transform: scale(0.95) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.celebrate-animation { /* Apply to feedback on correct guess */
    animation: celebrate 0.7s ease-out;
}

/* --- Confetti Animation --- */
 .confetti {
    position: fixed; width: 10px; height: 10px;
    background-color: #f00; /* Default, overridden by JS */
    opacity: 1;
    top: -20px; /* Start above screen */
    animation: fall 3s linear forwards; /* Use fall animation */
    z-index: 200; /* Above most elements */
    border-radius: 2px;
    pointer-events: none; /* Don't interfere with clicks */
 }
 @keyframes fall {
    0% { transform: translateY(0vh) rotateZ(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotateZ(720deg); opacity: 0; } /* Fall below screen */
 }


/* --- Responsive Layout Adjustments for Game Elements --- */
@media (min-width: 950px) {
    body.spelling-mode:not(.game-ended) .check-next-controls {
        display: flex !important;
        width: 100%;
    }
    body.spelling-mode .check-next-controls button {
        width: 100%;
    }
}

.check-next-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
    justify-items: stretch;
    align-items: stretch;
}

body.translation-mode #emoji-indicator {
margin-top: 0px !important;
}

 @media (max-width: 380px) {
    /* Adjustments for very small screens */
     .check-next-controls {
        max-width: 95%; /* Use most of the width */
        gap: 8px; /* Reduce gap */
     }
     .check-next-controls button {
        height: 50px; /* Slightly shorter buttons */
        /* font-size: 1rem; */ /* Removed, handled by clamp() */
     }
     /* Adjust loading/listening font size */
      #play-word-btn.button-state-loading,
      #play-word-btn.button-state-listening {
          font-size: 0.9em;
      }
     #end-game-controls {
        min-height: 50px;
        gap: 10px;
     }
     #play-again-btn {
        padding: 8px 15px;
        /* font-size: 1.1em; */ /* Removed, handled by clamp() */
     }
     /* Adjust skip modal on small screens */
     .skip-modal-content {
        max-width: 95%;
        padding: 20px;
     }
     .skip-modal-content h2 { font-size: 1.2em; }
     .skip-modal-content p { font-size: 1em; }
     .skip-modal-buttons button { padding: 10px 20px; font-size: 0.9em;}

     /* Adjust Level Selection on small screens */
     #level-selection-screen h1 { font-size: 2.8em; } /* Slightly larger than the original 2.2em */
     .level-buttons { gap: 15px; }
     .level-btn {
        padding: 15px 8px;
        font-size: 1.2em;
        min-width: 100px; /* Adjust min-width */
     }
 }


 /* --- Home Confirmation Modal Styles --- */
#home-confirm-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Controlled by JS */
    justify-content: center; align-items: center;
    z-index: 156; /* Above skip modal */
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.home-modal-content {
    background: #fff; padding: 30px 40px; border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
    width: 90%; max-width: 400px; /* Slightly wider maybe */
    text-align: center; position: relative;
    border: 3px solid #FFA500; /* Orange border */
}
.home-modal-content h2 { color: #E67E22; margin-top: 0; margin-bottom: 15px; font-size: 1.4em; } /* Orange title */
.home-modal-content p { margin-bottom: 25px; color: #555; font-size: 1.1em; line-height: 1.4; }
.home-modal-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.home-modal-buttons button {
    padding: 12px 25px; font-size: 1em; cursor: pointer; border: none;
    border-radius: 20px; transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold;
}
#confirm-home-btn { background-color: #FF6347; color: white; } /* Reddish confirmation */
#cancel-home-btn { background-color: #A9A9A9; color: white; }
#confirm-home-btn:hover, #cancel-home-btn:hover { filter: brightness(1.1); }
#confirm-home-btn:active, #cancel-home-btn:active { transform: scale(0.98); }
#close-home-modal-btn { /* Same style as other close buttons */
    position: absolute; top: 10px; right: 15px;
    font-size: 1.8em; cursor: pointer; color: #aaa;
    line-height: 1; border: none; background: none; padding: 0;
}
#close-home-modal-btn:hover { color: #666; }



/* --- START OF REVISED WAVE ANIMATION CSS (Loop with Pause) --- */

/* Keyframes including the pause */
@keyframes waveJumpWithPause {
  /* Start */
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  /* Peak of Jump (approx 21.4% of 1.75s) */
  21.4% {
    transform: translateY(-0.6em) scale(1.1);
    opacity: 1;
  }
  /* Return to Baseline (approx 42.9% of 1.75s) */
  42.9% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  /* Stay at Baseline during Pause */
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Styling for the individual letter spans (using ID for specificity) - TARGET SPELLING ONLY */
#feedback-spelling.wave-active span.wave-letter { /* Target spans with wave-letter class */
  display: inline-block; /* Essential for transform */
  position: relative;
  /* Apply the NEW animation */
  animation-name: waveJumpWithPause; /* Use the new keyframes */
  animation-duration: 7.75s; /* Use the TOTAL cycle duration */
  animation-timing-function: cubic-bezier(0.15, 0, 0.25, 1); /* Applied across the whole 3.75s cycle */
  animation-iteration-count: infinite; /* Loop the full cycle */
  /* animation-fill-mode: forwards; /* Less critical with infinite loop but harmless */
  /* animation-delay is set inline via JavaScript - this remains the same */
  will-change: transform; /* Hint for browser optimization */
}

/* --- END OF REVISED WAVE ANIMATION CSS --- */

/* --- Game Selection Screen Styles --- */
/* --- Consolidated Game Selection Screen Styles --- */
#game-selection-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;

    /* Use a semi-transparent gradient */
    background: linear-gradient(135deg, rgba(137, 247, 254, 0.7) 0%, rgba(102, 166, 255, 0.7) 100%); /* 70% opaque gradient */

    display: none; /* Controlled by JS */
    flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 20px;
    box-sizing: border-box;

    /* Optional: Add backdrop-filter if desired with the transparent gradient */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);

    /* Ensure it's above the animation */
    z-index: 110;

    opacity: 0; /* Start faded out */
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#game-selection-screen.visible {
    display: flex; /* Or display: block; if flex isn't needed when visible */
    opacity: 1;
    visibility: visible;
}


#game-selection-screen h1 {
    color: #FFFFFF; font-size: clamp(2em, 1.5em + 3vw, 3.5em); /* Adaptive font size */
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    margin-bottom: 15px; /* Adjusted margin */
    /* animation: bounceIn 1s ease-out; Apply animation when screen becomes visible */
}

#game-selection-screen h2 {
    color: #f0f8ff; /* Alice Blue */
    font-size: clamp(1.2em, 1em + 1.5vw, 2.2em); /* Adaptive font size */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.game-selection-buttons {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 20px; /* Space between buttons */
    align-items: center;
}

/* Style for individual game selection buttons */
.game-selection-buttons button {
    padding: 18px 35px;
    font-size: clamp(1.1em, 0.9em + 1vw, 1.8em); /* Adaptive font size */
    cursor: pointer;
    border: none;
    border-radius: 40px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    background: linear-gradient(45deg, #ff9a8b, #ff6a88); /* Pink/Orange gradient */
    color: white;
    min-width: 300px; /* Ensure buttons have decent width */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.game-selection-buttons button:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.game-selection-buttons button:active:not(:disabled) {
    transform: scale(1.03);
    filter: brightness(0.95);
}

.game-selection-buttons button:disabled {
    background: #bdc3c7; /* Clouds */
    color: #7f8c8d; /* Asbestos */
    cursor: not-allowed;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    transform: none;
}

/* --- Level Selection Screen Fun Styles --- */
#level-selection-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Fun sky gradient background */
    background: linear-gradient(160deg, #87CEEB 0%, #a8e0f7 40%, #f0e68c 100%); /* Sky blue -> Lighter Blue -> Pale Yellow (sun) */
    display: none; flex-direction: column; justify-content: center; align-items: center;
    z-index: 110; padding: 20px; box-sizing: border-box;
}

/* Pop-in animation keyframes */
@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Make level selection screen a flex container when visible */
#level-selection-screen.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

/* Initial hidden state for pop-in elements */
#level-selection-screen.show h1,
#level-selection-screen.show .level-btn {
  opacity: 0;
  transform: scale(0);
}

/* Animate title */
#level-selection-screen.show h1 {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0s;
}

/* Animate buttons with staggered delays */
#level-selection-screen.show .level-buttons button:nth-child(1) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.2s;
}
#level-selection-screen.show .level-buttons button:nth-child(2) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.4s;
}
#level-selection-screen.show .level-buttons button:nth-child(3) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.6s;
}
#level-selection-screen.show .level-buttons button:nth-child(4) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.8s;
}
#level-selection-screen.show .level-buttons button:nth-child(5) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 1s;
}

@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

#level-selection-screen h1 {
    color: #FFFFFF;
    font-size: clamp(1.2rem, 5vw, 4rem);
    margin-bottom: 45px; /* More space */
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.5); /* Deeper shadow + glow */
    animation: floatAnimation 4s ease-in-out infinite; /* Add a gentle floating effect */
    font-weight: bold;
    letter-spacing: 1px;
}

/* Shared title style for splash and level selection */
.title-style {
    font-family: 'Luckiest Guy', cursive;
    font-size: 4em;
    color: white;
    text-shadow:
        2px 2px 4px rgba(0,0,0,0.5),
        0 0 15px rgba(255,255,255,0.7);
}

.level-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Slightly smaller min-width */
    gap: 25px; /* Increased gap */
    width: 85%;
    max-width: 750px;
    z-index: 2; /* Buttons above background elements */
    justify-items: center;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg) scale(1.05); }
    25% { transform: rotate(-4deg) scale(1.05); }
    75% { transform: rotate(4deg) scale(1.05); }
}

.level-btn {
    padding: 20px 10px;
    font-size: clamp(1.2em, 1em + 1vw, 1.5em); /* Adaptive font */
    cursor: pointer;
    border: none; /* Remove default border */
    border-radius: 35px; /* More rounded */
    color: #fff; /* White text for contrast */
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), inset 0 -3px 5px rgba(0,0,0,0.15);
    min-height: 80px; /* Ensure decent height */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    position: relative; /* For potential pseudo-elements */
}

/* Unique colors for each level button */
.level-btn[data-level="1"] { background: linear-gradient(135deg, #90EE90, #32CD32); } /* Green */
.level-btn[data-level="2"] { background: linear-gradient(135deg, #FFD700, #FFA500); } /* Gold/Orange */
.level-btn[data-level="3"] { background: linear-gradient(135deg, #87CEFA, #1E90FF); } /* Blue */
.level-btn[data-level="4"] { background: linear-gradient(135deg, #FFB6C1, #FF69B4); } /* Pink */
.level-btn[data-level="5"] { background: linear-gradient(135deg, #DDA0DD, #BA55D3); } /* Purple */

.level-btn:hover {
    /* transform: scale(1.1) rotate(3deg); */
    animation: wiggle 0.6s ease-in-out; /* Wiggle on hover */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3), inset 0 -2px 3px rgba(0,0,0,0.1);
    filter: brightness(1.1);
}
.level-btn:active {
    transform: scale(1.02) rotate(0deg) !important; /* Slightly smaller pop on click */
    animation: none; /* Stop wiggle on click */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 -1px 2px rgba(0,0,0,0.1);
    filter: brightness(0.95);
}

/* --- Decorative Background Elements for Level Selection --- */
.level-bg-element {
    position: absolute;
    z-index: 1; /* Behind buttons */
    opacity: 0.5;
    pointer-events: none; /* Don't block clicks */
}

.level-bg-element.star {
    color: yellow; /* Simple text star */
    font-size: 2em; /* Adjust size */
    animation: twinkle 3s infinite alternate ease-in-out;
}
.level-bg-element.cloud {
    width: 160px;
    height: 80px;
    background: white;
    border-radius: 50%;
    opacity: 0.7;
    animation: drift 20s infinite linear alternate;
    /* Basic cloud shape using pseudo-elements */
    position: relative;
}
.level-bg-element.cloud::before, .level-bg-element.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}
.level-bg-element.cloud::before {
    width: 80px;
    height: 80px;
    top: -40px;
    left: 20px;
}
.level-bg-element.cloud::after {
    width: 100px;
    height: 100px;
    top: -30px;
    right: 10px;
}

/* Position elements */
.star1 { top: 15%; left: 10%; animation-delay: 0.5s; }
.star2 { top: 70%; left: 85%; animation-delay: 1.2s; font-size: 1.5em; }
.star3 { top: 25%; left: 75%; animation-delay: 2s; }
.cloud1 {
    top: 10%;
    left: 5%;
    width: 120px;
    height: 60px;
    animation-duration: 25s;
}
.cloud2 {
    top: 20%;
    left: 70%;
    width: 200px;
    height: 100px;
    animation-duration: 18s;
}
.cloud3 {
    top: 35%;
    left: 30%;
    width: 150px;
    height: 75px;
    animation-duration: 22s;
}
.cloud4 {
    top: 50%;
    left: 50%;
    width: 180px;
    height: 90px;
    animation-duration: 30s;
}
.cloud5 {
    top: 65%;
    left: 20%;
    width: 100px;
    height: 50px;
    animation-duration: 15s;
}
.cloud6 {
    top: 5%;
    left: 40%;
    width: 140px;
    height: 70px;
    animation-duration: 28s;
}
.cloud7 {
    top: 25%;
    left: 85%;
    width: 160px;
    height: 80px;
    animation-duration: 20s;
}

@keyframes twinkle {
    from { opacity: 0.3; transform: scale(0.8); }
    to { opacity: 0.8; transform: scale(1.1); }
}
@keyframes drift {
    from { transform: translateX(-20px); }
    to { transform: translateX(20px); }
}

/* --- End Level Selection Fun Styles --- */

/* --- Spelling Level Selection Screen Styles --- */
#spelling-level-selection-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Fun sky gradient background - maybe a different color? */
    background: linear-gradient(160deg, #FFDAB9 0%, #ffecb3 40%, #ffe066 100%); /* Peachpuff -> Light Yellow -> Yellow */
    display: none; flex-direction: column; justify-content: center; align-items: center;
    z-index: 110; padding: 20px; box-sizing: border-box;
    overflow: hidden; /* Contain decorative elements */
}

/* Pop-in animation keyframes - reuse existing */
/* @keyframes popIn { ... } */

/* Make spelling level selection screen a flex container when visible */
#spelling-level-selection-screen.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

/* Initial hidden state for pop-in elements */
#spelling-level-selection-screen.show h1,
#spelling-level-selection-screen.show .level-btn {
  opacity: 0;
  transform: scale(0);
}

/* Animate title */
#spelling-level-selection-screen.show h1 {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0s;
}

/* Animate buttons with staggered delays - reuse existing delays */
#spelling-level-selection-screen.show .level-buttons button:nth-child(1) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.2s;
}
#spelling-level-selection-screen.show .level-buttons button:nth-child(2) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.4s;
}
#spelling-level-selection-screen.show .level-buttons button:nth-child(3) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.6s;
}
#spelling-level-selection-screen.show .level-buttons button:nth-child(4) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 0.8s;
}
#spelling-level-selection-screen.show .level-buttons button:nth-child(5) {
  animation: popIn 0.6s ease-out forwards;
  animation-delay: 1s;
}

/* Reuse floatAnimation for title */
#level-selection-screen h1 {
    color: #FFFFFF;
    font-size: clamp(1.2rem, 5vw, 4rem);
    margin-bottom: 45px; /* More space */
    /* text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.5); /* Deeper shadow + glow */
    animation: floatAnimation 4s ease-in-out infinite; /* Add a gentle floating effect */
    font-weight: bold;
    letter-spacing: 1px;
}

/* Reuse .level-buttons and .level-btn styles from above */
/* .level-buttons { ... } */
/* .level-btn { ... } */

/* Unique colors for each spelling level button */
#spelling-level-selection-screen .level-btn[data-level="1"] { background: linear-gradient(135deg, #A0522D, #8B4513); } /* Sienna/Saddle Brown */
#spelling-level-selection-screen .level-btn[data-level="2"] { background: linear-gradient(135deg, #CD853F, #D2691E); } /* Peru/Chocolate */
#spelling-level-selection-screen .level-btn[data-level="3"] { background: linear-gradient(135deg, #F4A460, #DEB887); } /* Sandy Brown/Burly Wood */
#spelling-level-selection-screen .level-btn[data-level="4"] { background: linear-gradient(135deg, #D2B48C, #BC8F8F); } /* Tan/Rosy Brown */
#spelling-level-selection-screen .level-btn[data-level="5"] { background: linear-gradient(135deg, #C0C0C0, #A9A9A9); } /* Silver/Dark Grey */


/* Reuse decorative background elements and animations if desired */
/* .level-bg-element { ... } */
/* .level-bg-element.star { ... } */
/* .level-bg-element.cloud { ... } */
/* @keyframes twinkle { ... } */
/* @keyframes drift { ... } */

/* --- End Spelling Level Selection Screen Styles --- */


/* Add bounce animation if needed (might already exist) */
@keyframes bounceIn {
     0% { opacity: 0; transform: scale(0.5) translateY(-50px); }
     60% { opacity: 1; transform: scale(1.1) translateY(10px); }
     80% { transform: scale(0.95) translateY(0); }
     100% { opacity: 1; transform: scale(1) translateY(0); }
}

#emoji-indicator {
    /* font-size: 7em; */
    font-size: calc((100vh - var(--progress-bar-height, 0px) - var(--keyboard-height, 0px) - 50px) * 0.2);
    text-align: center;
    margin-top: -45px;
    margin-bottom: 0px;
    transform-origin: bottom center;
    animation: rockEmoji 1.8s ease-in-out infinite alternate;
    display: inline-block;
    /* transition: all 0.3s ease; */
}

/* Inner span that will hold the actual emoji character */
#emoji-indicator > span.emoji-char {
    display: inline-block; /* Needed for transform */
    transform-origin: center; /* Pop from the center */
}


/* --- Emoji Rocking Animation --- */
@keyframes rockEmoji {
    0% {
        transform: rotate(-6deg); /* Start tilted slightly left */
    }
    100% {
        transform: rotate(6deg); /* End tilted slightly right */
    }
    /* 'alternate' direction handles the back-and-forth */
}

/* --- Emoji Pop Animation --- */
@keyframes popEmoji {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); } /* Peak of the pop */
    100% { transform: scale(1); }
}

.emoji-pop {
    /* Apply the animation */
    animation: popEmoji 0.3s ease-out 1; /* Play once */
}




/* --- Loading Animation for Fetching Sentences --- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#feedback.feedback-loading-sentences::after {
    content: '⏳'; /* Or '🔄', '🌍' */
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9em; /* Adjust size relative to feedback text */
    animation: spin 1.5s linear infinite;
    vertical-align: middle; /* Align emoji nicely */
}

/* Optional: Style to disable level buttons during load */
.level-buttons.level-buttons-loading button {
    pointer-events: none; /* Prevent clicking */
    opacity: 0.6; /* Dim the buttons */
    cursor: default;
    animation: none; /* Stop hover/active animations */
    transform: none; /* Reset transform */
}

/* --- Responsive Adjustments for Level Selection Title --- */
@media (max-width: 600px) {
  #level-selection-screen h1 {
    /* Aggressive font size for typical phone widths */
    font-size: clamp(3em, 10vw, 5em); /* Much larger base, scales faster, caps higher */
    line-height: 1.1; /* Tighter line height for wrapping */
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.6); /* Stronger shadow + glow */
    text-align: center; /* Ensure centering */
    /* Keep reduced margin */
    margin-bottom: 35px;
  }
}

/* Responsive Adjustments for Spelling Level Selection Title */
@media (max-width: 600px) {
  #spelling-level-selection-screen h1 {
    /* Aggressive font size for typical phone widths */
    font-size: clamp(3em, 10vw, 5em); /* Much larger base, scales faster, caps higher */
    line-height: 1.1; /* Tighter line height for wrapping */
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.6); /* Stronger shadow + glow */
    text-align: center; /* Ensure centering */
    /* Keep reduced margin */
    margin-bottom: 35px;
  }
}


.incorrect-word {
  color: red;
  text-decoration: underline;
  text-decoration-color: red;
  text-decoration-style: wavy;
  background-color: rgba(255, 0, 0, 0.1); /* Optional subtle background */
}


/* === Translation Game Clean Colorful Style === */

.app-container {
  /* background: linear-gradient(135deg, rgba(224, 247, 250, 0.5), rgba(197, 224, 240, 0.7)); */
  background: linear-gradient(135deg, rgba(224, 247, 250, 0), rgba(197, 224, 240, 0));
  /* border: 3px solid #87ceeb; */
  /* box-shadow: 0 4px 20px rgba(0,0,0,0.1); */
  font-family: 'Comic Sans MS', sans-serif;
}

.check-next-controls button,
#play-again-btn,
#submit-report-btn,
#download-report-btn {
  background-color: #4caf50;
  color: white;
  border-radius: 25px;
  border: none;
  font-family: 'Comic Sans MS', sans-serif;
  font-weight: bold;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.check-next-controls button:hover,
#play-again-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#input-display {
  border: 2px solid #87ceeb;
  background: #f0f8ff;
  font-family: 'Comic Sans MS', sans-serif;
  /* width: 70vw; */
}

#feedback, #feedback-spelling { /* Update commented styles too */
  font-family: 'Comic Sans MS', sans-serif;
  font-size: 1.5em;
  color: #333;
  text-wrap: balance;
}

#feedback.correct, #feedback-spelling.correct { color: #4caf50; } /* Update commented styles too */
#feedback.incorrect, #feedback-spelling.incorrect { color: #f44336; } /* Update commented styles too */

.progress-container {
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* === End Clean Colorful Style === */

#level-selection-screen h1 {
    text-align: center;
}

.level-buttons {
    justify-items: center;
}




#input-display {
  position: relative;
  display: inline-block;
  padding-right: 10px; /* Space for the blinking caret */
}

#input-display::after {
  content: "|"; /* The blinking caret character */
  animation: blink 1.2s steps(1) infinite;
  color: lightgrey; /* Customizable */
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
