body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

select, button, input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 20px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #27ae60;
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-area {
    display: none; /* Hidden until quiz starts */
    flex-direction: column;
    gap: 15px;
}

.question-box {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 5px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    text-align: left;
}

.macron-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
}

.macron-btn {
    background-color: #95a5a6;
    padding: 5px 10px;
    font-size: 14px;
}

.macron-btn:hover {
    background-color: #7f8c8d;
}

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
    text-align: left;
}

.feedback.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.full-entry {
    margin-top: 10px;
    font-style: italic;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 10px;
}

.hidden {
    display: none !important;
}

label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: #3498db;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode h1 {
    color: #e0e0e0;
}

body.dark-mode .container {
    background: #16213e;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body.dark-mode .question-box {
    background-color: #0f3460;
}

body.dark-mode input,
body.dark-mode select {
    background-color: #1a1a2e;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .macron-btn {
    background-color: #444;
}

body.dark-mode .macron-btn:hover {
    background-color: #555;
}

body.dark-mode .progress-container {
    background-color: #444;
}

body.dark-mode .feedback.correct {
    background-color: #1e5631;
    color: #a8d5a2;
    border-color: #2d6a4f;
}

body.dark-mode .feedback.incorrect {
    background-color: #4a2c2c;
    color: #ffb3b3;
    border-color: #6b3a3a;
}

body.dark-mode .full-entry {
    border-top-color: rgba(255,255,255,0.1);
}

body.dark-mode #progress-text {
    color: #aaa;
}
