/* study/style.css */
body {
    background-color: #f0f2f5;
    font-family: 'Poppins', sans-serif;
}

#study-app {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.back-button-main {
    display: inline-block;
    margin-bottom: 2rem;
    color: #45a247;
    text-decoration: none;
    font-weight: 600;
}
.back-button-main:hover {
    text-decoration: underline;
}

h1 {
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.level-selection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.level-btn {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    background-color: #fafafa;
    color: #333;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    width: 100%;
    text-align: center;
}

.level-btn:hover {
    background-color: #45a247;
    color: white;
    border-color: #45a247;
    transform: translateY(-2px);
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.lesson-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border-left: 4px solid transparent;
}

.lesson-item:hover {
    border-left: 4px solid #45a247;
    background-color: #f0f0f0;
    transform: translateX(5px);
}

.lesson-item.active {
    background-color: #e8f5e9;
    border-color: #45a247;
    color: #2e7d32;
    font-weight: 600;
    border-left: 4px solid #45a247;
}

.lesson-content {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    line-height: 1.7;
    border: 1px solid #e0e0e0;
}

.lesson-content ol, .lesson-content ul {
    padding-left: 20px;
}

.exercise-box {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
}

.exercise-prompt {
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.exercise-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
}

.exercise-option-btn {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    border-radius: 4px;
}
.exercise-option-btn:hover:not(:disabled) {
    background-color: #e8f5e9;
    border-color: #45a247;
}
.exercise-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.exercise-feedback {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    display: none;
}

.feedback-correct {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    display: block;
    padding: 0.75rem;
    border-radius: 4px;
}

.feedback-incorrect {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    display: block;
    padding: 0.75rem;
    border-radius: 4px;
}

.mode-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.mode-select-btn {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
}
.mode-select-btn:hover {
    background-color: #e0e0e0;
}


.formula-box {
    background-color: #f9f9f9;
    border-left: 4px solid #45a247;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    border-radius: 4px;
}

.formula-box code {
    font-family: monospace;
    background-color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.95em;
    display: block;
    margin-bottom: 0.5rem;
}

.formula-box p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9em;
    color: #555;
}

.back-button {
    background: none;
    border: none;
    color: #45a247;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.5rem;
}
.back-button:hover {
    text-decoration: underline;
}