:root {
    --bg-color: #f0f4f8;        
    --card-bg: #ffffff;         
    --text-primary: #334155;    
    --text-secondary: #64748b;  
    --primary: #94a3b8;         
    --primary-hover: #cbd5e1;
    --success-bg: #dcfce7;      
    --success-text: #166534;
    --error-bg: #fee2e2;        
    --error-text: #991b1b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease-in-out;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}
.app-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.app-header {
    text-align: center;
}
.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}
.progress {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.content-area {
    position: relative;
    width: 100%;
}
.state-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.4s ease-out forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.state-card.hidden {
    display: none !important;
}
.state-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.state-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.question-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
#question-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: left;
    width: 100%;
    line-height: 1.5;
}
.toggle-container {
    margin-bottom: 1.5rem;
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}
.toggle-label input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary);
    cursor: pointer;
}
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}
.option-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.option-btn:hover:not(:disabled) {
    background-color: var(--card-bg); 
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.2); 
}
.option-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: none;
}
.option-btn:disabled {
    cursor: default;
    opacity: 0.7;
}
.option-btn.correct {
    background-color: var(--success-bg);
    border-color: var(--success-bg);
    color: var(--success-text);
    font-weight: 500;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.1);
    z-index: 10;
}
.option-btn.wrong {
    background-color: var(--error-bg);
    border-color: var(--error-bg);
    color: var(--error-text);
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
.feedback {
    margin-top: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.3s ease-out;
}
.feedback.hidden {
    display: none !important;
}
#feedback-text {
    font-weight: 500;
    margin-bottom: 0;
}
.feedback-correct {
    color: var(--success-text);
}
.feedback-wrong {
    color: var(--error-text);
}
.primary-btn, .secondary-btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}
.primary-btn {
    background-color: var(--primary);
    color: var(--card-bg);
    box-shadow: var(--shadow-sm);
}
.primary-btn:hover {
    background-color: var(--text-secondary);
}
.secondary-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.secondary-btn:hover {
    background-color: var(--bg-color);
}
.hidden {
    display: none !important;
}
.score-display {
    margin: 1.5rem 0;
    font-family: inherit;
}
.score-number {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
}
.score-denomiator {
    font-size: 1.5rem;
    color: var(--text-secondary);
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}
@keyframes pop {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.streak-message {
    color: var(--error-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--error-bg);
    border-radius: var(--radius-md);
    text-align: center;
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@media (max-width: 480px) {
    .state-card {
        padding: 1.5rem;
    }
}

.quiz-selection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.quiz-card {
    background-color: var(--bg-color);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.quiz-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.2);
    background-color: #ffffff;
}

.quiz-card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    line-height: 1;
}

.quiz-card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quiz-card-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}
