:root {
    --primary: #0d9488;
    --correct: #22c55e;
    --wrong: #ef4444;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --sidebar-w: 300px;
}

* { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-w);
    background: white;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    z-index: 100;
}

#sidebar h2 { font-size: 1.25rem; margin-bottom: 2rem; color: var(--primary); }

details { margin-bottom: 1rem; }
summary { 
    font-weight: 600; 
    cursor: pointer; 
    list-style: none; 
    padding: 0.5rem;
    border-radius: 0.5rem;
}
summary:hover { background: #f1f5f9; }
summary::-webkit-details-marker { display: none; }

.sidebar-nav { list-style: none; padding-left: 1rem; margin-top: 0.5rem; }
.sidebar-nav li { margin-bottom: 0.5rem; }
.sidebar-nav a { 
    text-decoration: none; 
    color: #64748b; 
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}
.sidebar-nav a:hover { color: var(--primary); }
.status-icon { margin-right: 0.5rem; font-size: 0.8rem; }

/* Main Content */
main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.content-wrapper {
    max-width: 800px;
    width: 100%;
}

.lesson-block {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.lesson-block h3 { margin-top: 0; display: flex; align-items: center; gap: 0.75rem; }

/* Exercises */
.ipa { font-family: monospace; color: #6b7280; background: #f1f5f9; padding: 0.1rem 0.3rem; border-radius: 0.2rem; }

.fill-blank input {
    border: none;
    border-bottom: 2px solid #cbd5e1;
    width: 100px;
    text-align: center;
    font-size: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.fill-blank input:focus { border-color: var(--primary); }
.fill-blank input.correct { border-color: var(--correct); color: var(--correct); }
.fill-blank input.wrong { border-color: var(--wrong); color: var(--wrong); }

.quiz-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}
.quiz-option:hover { border-color: var(--primary); background: #f0fdfa; }
.quiz-option.selected-correct { background: var(--correct); color: white; border-color: var(--correct); }
.quiz-option.selected-wrong { background: var(--wrong); color: white; border-color: var(--wrong); }

.word-bank { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; min-height: 40px; padding: 1rem; background: #f1f5f9; border-radius: 0.5rem; }
.word { background: white; padding: 0.4rem 0.8rem; border-radius: 2rem; border: 1px solid #cbd5e1; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.drop-zone { display: inline-block; min-width: 80px; border-bottom: 2px dashed #cbd5e1; margin: 0 0.2rem; vertical-align: bottom; }

.btn-check {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.shake { animation: shake 0.2s ease 2; }

@media (max-width: 768px) {
    #sidebar { transform: translateX(-100%); }
    main { margin-left: 0; }
}
