:root {
    /* 60% - Primary/Background Colors */
    --primary-bg: #f0f4f8;
    --card-bg: #ffffff;
    
    /* 30% - Secondary Colors */
    --secondary-color: #0891b2;
    --secondary-light: #e2e8f0;
    --secondary-dark: #334155;
    
    /* 10% - Accent Colors */
    --accent-color: #0ea5e9;
    --accent-light: #bae6fd;
    --accent-dark: #0284c7;
    
    /* Text Colors */
    --text-dark: #0f172a;
    --text-light: #ffffff;
    --text-muted: #64748b;
}

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background-color: var(--primary-bg);
    margin: 0;
    padding: 10px;
    line-height: 1.5;
    color: var(--text-dark);
}

.header-container {
    position: relative;
    margin-bottom: 15px;
}

.header {
    text-align: center;
    background-color: #ffffff;
    color: var(--accent-dark);
    padding: 10px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.header h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Questions Section */
.questions-section {
    display: block; /* Changed from 'none' to 'block' to show by default */
}

.subject-header {
    text-align: center;
    background-color: var(--accent-color);
    color: white;
    padding: 8px;
    border-radius: 15px;
    width: 250px;
    margin: 15px auto;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.15);
    font-size: 0.9rem;
}

.question-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #03a9f4;
    transition: all 0.3s ease;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.question-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-light);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.question {
    color: #1565c0;
    margin-bottom: 8px;
    font-weight: 700;
    flex-grow: 1;
    font-size: 0.95rem;
    padding-right: 10px;
}

.toggle-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.toggle-btn:hover {
    background-color: var(--accent-dark);
}

.answer {
    display: none;
    background-color: var(--accent-light);
    padding: 8px;
    border-radius: 8px;
    margin-top: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Mode Switch Button */
.mode-switch {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-dark);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 20px;
    width: 82%;
    max-width: 500px;
    border-top: 4px solid #03a9f4;
    border-bottom: 4px solid #03a9f4;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-title {
    color: var(--accent-dark);
    margin-bottom: 20px;
    font-size: 22px;
}

.mode-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 640px) {
    .mode-options {
        flex-direction: row;
        justify-content: center;
    }
}

.mode-option {
    flex: 1;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mode-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mode-option.learn {
    background-color: var(--accent-light);
}

.mode-option.memorize {
    background-color: var(--secondary-light);
}

.mode-icon {
    font-size: 28px;
    color: var(--accent-dark);
}

.mode-name {
    font-weight: bold;
    font-size: 16px;
}

.mode-description {
    font-size: 13px;
    color: var(--text-muted);
}

/* Learn Mode Styles */
.learn-mode .answer {
    display: block !important;
}

.learn-mode .toggle-btn {
    display: none;
}

.learn-mode .question-container {
    border-left: 4px solid #4caf50;
}

@media (min-width: 576px) {
    body {
        padding: 15px;
    }
    
    .header {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .question {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .subject-header {
        width: 180px;
    }
}