/* ===== GENERAL ===== */

body {
    max-width: 900px;
    margin: 40px auto;
    font-family: Arial, sans-serif;
}

/* ===== LOADING OVERLAY ===== */

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ddd;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    background: white;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ===== MODAL ===== */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    width: 70%;
    max-width: 600px;
}

.sentence-text {
    font-size: 32px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.sentence-text.show {
    opacity: 1;
    transform: scale(1);
}

@keyframes pop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.sentence-text.show {
    animation: pop 0.4s ease forwards;
}

fieldset {
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

legend {
    font-weight: bold;
    padding: 0 8px;
    color: #555;
}

.sentence-text {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    padding: 12px 16px;
}

.completed {
    opacity: 0.6;
}

.question-item {
    padding: 10px;
    margin: 6px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover */
.question-item:hover {
    background: #f5f5f5;
}

/* Active (currently playing) */
.question-item.active {
    background: #d0ebff;
    border-color: #339af0;
}

/* ✅ Played style */
.question-item.played {
    background: #f0f0f0;
    color: #999;
}

.question-item.played-completed {
    background: #f0f0f0;
    color: #999;
}

/* Optional: Add check icon */
.question-item.played-completed::after {
    content: " ✓";
    font-weight: bold;
    color: #2b9348;
}