.victory {
    color: green;
    font-weight: bold;
}
/* Difficulty color classes */
.difficulty-easy {
    color: green;
}
.difficulty-medium {
    color: orange;
}
.difficulty-hard {
    color: red;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 80px 10px 20px 10px; /* Account for fixed nav header and add side padding */
}

.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-header .home-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: static; /* Override the absolute positioning */
    min-height: 44px; /* Minimum touch target size */
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-header .home-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

.container {
    background-color: white;
    padding: 2em;
    border-radius: 0.5em;
    box-shadow: 0 0 0.8em rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    margin-top: 0;
    width: 100%;
    max-width: 500px; /* Limit max width for larger screens */
    box-sizing: border-box;
}

.difficulty-display {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1em;
}

.difficulty-display span {
    font-weight: 600;
}

.previous-question {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1em;
    margin: 1em 0;
    text-align: left;
}

.previous-question h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #495057;
    font-size: 1em;
}

.previous-question p {
    margin: 0.3em 0;
    font-size: 0.95em;
}

.user-answer.correct {
    color: #28a745;
    font-weight: 600;
}

.user-answer.incorrect {
    color: #dc3545;
    font-weight: 600;
}

.correct-answer {
    color: #28a745;
    font-weight: 600;
}

input {
    padding: 1em;
    font-size: 1.2em;
    margin: 0.5em;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    -webkit-appearance: none; /* Remove iOS styling */
    appearance: none;
}

input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    padding: 1em 1.5em;
    font-size: 1.2em;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    margin: 0.5em;
    min-height: 44px; /* Minimum touch target size */
    min-width: 88px; /* Minimum touch target width */
    transition: all 0.3s ease;
    font-weight: 600;
}

button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button[type="button"] {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

button[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Form layout improvements for mobile */
form {
    margin: 1.5em 0;
}

form p {
    margin-bottom: 1em;
    font-size: 1.3em;
    font-weight: 600;
}

.form-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .nav-header {
        padding: 12px 15px;
    }
    
    .page-title {
        font-size: 1.3em;
    }
    
    .nav-header .home-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .container {
        padding: 1.5em;
        margin: 0 5px;
    }
    
    input {
        font-size: 1.1em;
        padding: 0.9em;
    }
    
    button {
        font-size: 1.1em;
        width: 100%;
        max-width: 200px;
    }
    
    form p {
        font-size: 1.2em;
    }
    
    h3 {
        font-size: 1.1em;
    }
    
    .previous-question {
        padding: 0.8em;
        margin: 0.8em 0;
    }
    
    .previous-question p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 70px 5px 15px 5px;
    }
    
    .nav-header {
        padding: 10px 12px;
    }
    
    .page-title {
        font-size: 1.1em;
    }
    
    .container {
        padding: 1em;
    }
    
    input {
        font-size: 1em;
        padding: 0.8em;
    }
    
    button {
        font-size: 1em;
        padding: 0.8em 1.2em;
    }
    
    .previous-question {
        padding: 0.7em;
        margin: 0.7em 0;
    }
    
    .previous-question h4 {
        font-size: 0.9em;
    }
    
    .previous-question p {
        font-size: 0.85em;
    }
}
p {
    font-size: 1.25em;    
}
.correct {
    color: green;
}
.incorrect {
    color: tomato;
}
li {
    list-style-type: none;
}
#note {
    font-size: 0.65em;
    color: #555;
    margin-top: -1.5em
}

/* Progression Map Styles */
.progression-map {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
}

.progression-map h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    text-align: center;
}

.progress-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.progress-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    position: relative;
}

.progress-stage.active {
    transform: scale(1.05);
}

.progress-stage.completed .stage-icon {
    background: #4CAF50;
    color: white;
    animation: pulse 2s infinite;
}

.progress-stage.current .stage-icon {
    background: #FF9800;
    color: white;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stage-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    border: 3px solid #ddd;
    transition: all 0.3s ease;
}

.stage-label {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stage-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.progress-bar {
    width: 80px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.75rem;
    color: #666;
    font-weight: bold;
}

.victory-text {
    font-size: 0.75rem;
    color: #4CAF50;
    font-weight: bold;
}

.progress-arrow {
    font-size: 1.5rem;
    color: #ccc;
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.progress-stage.completed ~ .progress-arrow {
    color: #4CAF50;
}

/* Mobile responsiveness for progression map */
@media (max-width: 768px) {
    .progression-map {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .progress-track {
        gap: 0.25rem;
        padding: 0.5rem 0;
    }
    
    .progress-stage {
        min-width: 80px;
    }
    
    .stage-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .stage-label {
        font-size: 0.8rem;
    }
    
    .progress-bar {
        width: 60px;
        height: 6px;
    }
    
    .progress-text, .victory-text {
        font-size: 0.7rem;
    }
    
    .progress-arrow {
        font-size: 1.2rem;
        margin: 0 0.25rem;
    }
}

@media (max-width: 480px) {
    .progress-track {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .progress-stage {
        min-width: auto;
        width: 100%;
        max-width: 200px;
    }
    
    .progress-bar {
        width: 100px;
    }
}


