* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f1117;
    color: #e2e8f0;
    overflow: hidden;
}

.coding-studio-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0f1117;
}

.studio-header {
    background: #1a1d2e;
    padding: 0.6rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2d3148;
    z-index: 100;
    flex-shrink: 0;
}

.studio-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4FB1FF 0%, #00DC82 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mark::before {
    content: 'G';
    font-weight: 800;
    font-size: 16px;
    color: #0C1118;
}

.logo-wordmark {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #f0f4f8;
}

.logo-subtitle {
    font-size: 0.55rem;
    color: #8892b0;
    font-weight: 500;
    letter-spacing: 1.5px;
}

.studio-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.python-badge {
    background: linear-gradient(135deg, #306998, #FFD43B);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-icon, .btn-icon-small {
    background: #252840;
    border: 1px solid #363a5c;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: #e2e8f0;
}

.btn-icon:hover, .btn-icon-small:hover {
    background: #363a5c;
}

.btn-primary {
    background: linear-gradient(135deg, #00DC82, #4FB1FF);
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0C1118;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 220, 130, 0.3);
}

.btn-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: #252840;
    color: #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid #363a5c;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: #363a5c;
}

.studio-panels {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tutor-panel {
    width: 340px;
    min-width: 250px;
    max-width: 550px;
    background: #1a1d2e;
    border-right: 1px solid #2d3148;
}

.editor-panel {
    flex: 1;
    min-width: 300px;
    background: #1e1e2e;
}

.output-panel {
    width: 320px;
    min-width: 200px;
    background: #1a1d2e;
    border-left: 1px solid #2d3148;
}

.panel-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #2d3148;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1d2e;
    flex-shrink: 0;
}

.panel-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #a0aec0;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-height: 0;
}

.editor-content {
    padding: 0;
}

#monacoEditor {
    height: 100%;
    width: 100%;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filename {
    font-size: 0.75rem;
    color: #8892b0;
    background: #252840;
    padding: 2px 8px;
    border-radius: 4px;
}

.run-controls {
    display: flex;
    gap: 0.4rem;
}

.btn-reset {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn-run {
    background: linear-gradient(135deg, #00DC82, #00c474);
    border: none;
    border-radius: 6px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0C1118;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-run:hover {
    box-shadow: 0 2px 8px rgba(0, 220, 130, 0.4);
}

.btn-run:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit {
    background: linear-gradient(135deg, #4FB1FF, #667eea);
    border: none;
    border-radius: 6px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    box-shadow: 0 2px 8px rgba(79, 177, 255, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
}

.resize-handle {
    width: 4px;
    background: #2d3148;
    cursor: col-resize;
    transition: background 0.2s;
    flex-shrink: 0;
}

.resize-handle:hover, .resize-handle.active {
    background: #4FB1FF;
}

.output-content {
    padding: 0.5rem;
}

.console-output {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    padding: 0.5rem;
}

.console-welcome p {
    color: #8892b0;
}

.console-success { color: #00DC82; }
.console-error { color: #fc8181; }

.console-line {
    margin-bottom: 2px;
}

.curriculum-view {
    padding: 0.75rem;
    padding-bottom: 2rem;
}

.curriculum-level {
    margin-bottom: 1.25rem;
}

.level-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    margin-bottom: 0.4rem;
}

.level-icon {
    font-size: 1.5rem;
}

.level-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f0f4f8;
}

.level-info p {
    font-size: 0.7rem;
    color: #8892b0;
    margin-top: 2px;
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topic-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.65rem;
    background: #252840;
    border: 1px solid #363a5c;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.topic-card:hover {
    border-color: #4FB1FF;
    background: #2a2e4a;
    transform: translateX(2px);
}

.topic-card.completed {
    border-color: #00DC82;
    background: rgba(0, 220, 130, 0.05);
}

.topic-status {
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
}

.topic-info {
    flex: 1;
    min-width: 0;
}

.topic-info strong {
    display: block;
    font-size: 0.8rem;
    color: #f0f4f8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-info small {
    font-size: 0.65rem;
    color: #8892b0;
}

.topic-steps {
    font-size: 0.65rem;
    color: #8892b0;
    white-space: nowrap;
}

.topic-progress-mini {
    height: 3px;
    background: #363a5c;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.topic-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00DC82, #4FB1FF);
    border-radius: 2px;
    transition: width 0.3s;
}

.capstone-card {
    border-color: #FFD700 !important;
    background: rgba(255, 215, 0, 0.05) !important;
}

.capstone-card:hover {
    border-color: #FFD700 !important;
    background: rgba(255, 215, 0, 0.1) !important;
}

.lesson-view, .capstone-view {
    padding: 0.75rem;
}

.step-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-badge.lesson {
    background: rgba(79, 177, 255, 0.15);
    color: #4FB1FF;
}

.step-badge.exercise {
    background: rgba(0, 220, 130, 0.15);
    color: #00DC82;
}

.step-badge.capstone {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
}

.step-badge.debug {
    background: rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
}

.step-badge.reverse {
    background: rgba(168, 85, 247, 0.15);
    color: #A855F7;
}

.step-badge.teachback {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
}

.step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f0f4f8;
    margin-bottom: 0.75rem;
}

.step-explanation p, .exercise-instruction p, .capstone-instructions p {
    font-size: 0.82rem;
    color: #c9d1d9;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.step-explanation code, .exercise-instruction code, .capstone-instructions code {
    background: #252840;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.78rem;
    color: #4FB1FF;
    font-family: 'JetBrains Mono', monospace;
}

.step-instruction {
    font-size: 0.78rem;
    color: #8892b0;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(79, 177, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #4FB1FF;
}

.expected-output {
    margin-top: 0.75rem;
    background: #252840;
    border-radius: 6px;
    padding: 0.5rem;
}

.expected-output strong {
    font-size: 0.72rem;
    color: #8892b0;
    display: block;
    margin-bottom: 4px;
}

.expected-output pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #00DC82;
    white-space: pre-wrap;
}

.exercise-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

.btn-hint {
    background: #252840;
    border: 1px solid #363a5c;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-hint:hover {
    background: #363a5c;
    border-color: #FFD700;
}

.hint-box {
    margin-top: 0.5rem;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
    padding: 0.6rem;
}

.hint-content {
    font-size: 0.8rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.hint-content strong {
    color: #FFD700;
}

.hint-loading {
    font-size: 0.8rem;
    color: #8892b0;
}

.validation-result {
    margin-top: 0.5rem;
    padding: 0.6rem;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.validation-result.passed {
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid rgba(0, 220, 130, 0.3);
}

.validation-result.failed {
    background: rgba(252, 129, 129, 0.1);
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.val-icon {
    font-size: 1rem;
}

.val-messages p {
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.passed .val-messages p { color: #00DC82; }
.failed .val-messages p { color: #fc8181; }

.step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #2d3148;
}

.btn-nav-step {
    background: #252840;
    border: 1px solid #363a5c;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.78rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav-step:hover {
    background: #363a5c;
}

.btn-nav-step.btn-next {
    background: linear-gradient(135deg, #4FB1FF, #667eea);
    color: white;
    border: none;
}

.btn-nav-step.btn-next:hover {
    box-shadow: 0 2px 8px rgba(79, 177, 255, 0.3);
}

.btn-nav-step.btn-complete {
    background: linear-gradient(135deg, #00DC82, #00c474);
    color: #0C1118;
    border: none;
    font-weight: 600;
}

.capstone-container {
    animation: fadeIn 0.3s ease;
}

.capstone-desc {
    font-size: 0.82rem;
    color: #c9d1d9;
    margin-bottom: 0.75rem;
}

.capstone-instructions,
.capstone-checkpoints,
.capstone-rubric,
.capstone-sample {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #252840;
    border-radius: 6px;
}

.capstone-instructions strong,
.capstone-checkpoints strong,
.capstone-rubric strong,
.capstone-sample strong {
    font-size: 0.75rem;
    color: #8892b0;
    display: block;
    margin-bottom: 4px;
}

.checkpoint {
    font-size: 0.78rem;
    color: #c9d1d9;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cp-icon {
    font-size: 0.9rem;
}

.rubric-item {
    font-size: 0.75rem;
    color: #c9d1d9;
    padding: 3px 0;
}

.rubric-item strong {
    text-transform: capitalize;
    color: #e2e8f0;
    display: inline;
}

.capstone-sample pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #00DC82;
    white-space: pre-wrap;
}

.capstone-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-submit-capstone {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0C1118;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-capstone:hover {
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    transform: translateY(-1px);
}

.capstone-hint-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.capstone-hint-btn .hint-icon {
    font-size: 1.1rem;
}

.capstone-hint-panel {
    margin-top: 0.75rem;
    background: linear-gradient(135deg, rgba(79, 177, 255, 0.08), rgba(102, 126, 234, 0.08));
    border: 1px solid rgba(79, 177, 255, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    animation: hintSlideIn 0.3s ease-out;
}

@keyframes hintSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hint-tutor-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hint-tutor-avatar {
    font-size: 1.5rem;
}

.hint-tutor-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hint-tutor-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #4FB1FF;
}

.hint-level-badge {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hint-voice-btn {
    background: rgba(79, 177, 255, 0.15);
    border: 1px solid rgba(79, 177, 255, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hint-voice-btn:hover {
    background: rgba(79, 177, 255, 0.3);
    transform: scale(1.05);
}

.hint-voice-btn.voice-ready {
    animation: voicePulse 2s ease-in-out 1;
}

@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 177, 255, 0); }
    50% { box-shadow: 0 0 0 6px rgba(79, 177, 255, 0.2); }
}

.hint-content {
    max-height: 300px;
    overflow-y: auto;
}

.hint-bubble {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 0.4rem 0;
}

.hint-bubble code {
    background: rgba(79, 177, 255, 0.15);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.82rem;
    color: #4FB1FF;
}

.hint-bubble pre.hint-code {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(79, 177, 255, 0.15);
    border-radius: 8px;
    padding: 0.6rem;
    margin: 0.5rem 0;
    font-size: 0.8rem;
    overflow-x: auto;
    color: #e0e0e0;
}

.hint-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hint-next-btn {
    background: rgba(79, 177, 255, 0.12);
    border: 1px solid rgba(79, 177, 255, 0.25);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    color: #4FB1FF;
    cursor: pointer;
    transition: all 0.2s;
}

.hint-next-btn:hover {
    background: rgba(79, 177, 255, 0.2);
    border-color: rgba(79, 177, 255, 0.4);
}

.hint-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint-progress {
    display: flex;
    gap: 0.3rem;
    margin-left: auto;
    font-size: 0.7rem;
}

.hint-dot {
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.3s;
}

.hint-dot.filled {
    color: #4FB1FF;
}

.capstone-evaluation {
    margin-top: 0.75rem;
}

.eval-loading {
    text-align: center;
    padding: 1.5rem;
    color: #8892b0;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #363a5c;
    border-top: 3px solid #4FB1FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.evaluation-card {
    background: #252840;
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid #363a5c;
}

.evaluation-card.eval-passed {
    border-color: #00DC82;
}

.evaluation-card.eval-retry {
    border-color: #FFD700;
}

.eval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.eval-badge {
    font-size: 1rem;
    font-weight: 700;
}

.eval-score {
    font-size: 1.25rem;
    font-weight: 800;
}

.score-high { color: #00DC82; }
.score-mid { color: #FFD700; }
.score-low { color: #fc8181; }

.eval-feedback p {
    font-size: 0.8rem;
    color: #c9d1d9;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.rubric-scores {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #363a5c;
}

.rubric-score-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid #2d3148;
}

.rubric-label {
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: capitalize;
}

.rubric-points {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4FB1FF;
    float: right;
}

.rubric-fb {
    font-size: 0.72rem;
    color: #c9d1d9;
    margin-top: 2px;
}

.next-steps {
    margin-top: 0.5rem;
}

.next-steps strong {
    font-size: 0.75rem;
    color: #8892b0;
}

.next-steps li {
    font-size: 0.75rem;
    color: #c9d1d9;
    margin-left: 1rem;
    margin-top: 2px;
}

.eval-error {
    color: #fc8181;
    font-size: 0.82rem;
    text-align: center;
    padding: 1rem;
}

.progress-bar-container {
    background: #1a1d2e;
    padding: 0.4rem 0.75rem;
    border-top: 1px solid #2d3148;
    flex-shrink: 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.progress-info span {
    font-size: 0.65rem;
    color: #8892b0;
}

.progress-track {
    height: 4px;
    background: #363a5c;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00DC82, #4FB1FF);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.ask-guro-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    transition: all 0.3s;
}

.ask-guro-overlay.hidden {
    display: none;
}

.ask-guro-panel {
    width: 380px;
    max-height: 480px;
    background: #1a1d2e;
    border-radius: 12px;
    border: 1px solid #363a5c;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ask-guro-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #2d3148;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ask-guro-header h3 {
    font-size: 0.9rem;
    color: #f0f4f8;
}

.btn-close {
    background: none;
    border: none;
    color: #8892b0;
    font-size: 1.3rem;
    cursor: pointer;
}

.btn-close:hover {
    color: #fc8181;
}

.ask-guro-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    max-height: 320px;
}

.guro-message, .user-message {
    display: flex;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 1.2rem;
    min-width: 28px;
    text-align: center;
}

.message-content {
    background: #252840;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    max-width: 85%;
}

.user-message .message-content {
    background: #363a5c;
}

.message-content p {
    font-size: 0.8rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.ask-guro-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #2d3148;
}

.ask-guro-input input {
    flex: 1;
    background: #252840;
    border: 1px solid #363a5c;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #e2e8f0;
    outline: none;
}

.ask-guro-input input:focus {
    border-color: #4FB1FF;
}

.btn-send {
    background: linear-gradient(135deg, #4FB1FF, #667eea);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

.btn-send:hover {
    box-shadow: 0 2px 8px rgba(79, 177, 255, 0.3);
}

.feedback-panel {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #252840;
    border-radius: 6px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #363a5c;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4e72;
}

.challenge-card {
    border-left: 3px solid #A855F7 !important;
}

.challenge-card:hover {
    border-color: #C084FC !important;
}

.debug-challenge,
.reverse-challenge,
.teachback-challenge {
    margin-bottom: 1rem;
}

.challenge-description {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.bug-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.btn-reset-code {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    color: #FF6B6B;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset-code:hover {
    background: rgba(255, 107, 107, 0.2);
}

.target-output-box {
    background: #1e2035;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.target-output-box strong {
    color: #A855F7;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

.target-output-pre {
    background: #12141f;
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #00DC82;
    white-space: pre-wrap;
    line-height: 1.5;
}

.constraints-box {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    color: #c4b5fd;
    margin-bottom: 0.75rem;
}

.code-to-read {
    background: #1e2035;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.code-to-read strong {
    color: #FBBF24;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

.code-display {
    background: #12141f;
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    line-height: 1.5;
    overflow-x: auto;
}

.explanation-prompt {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #fde68a;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.teachback-textarea {
    width: 100%;
    background: #1a1d2e;
    border: 1px solid #363a5c;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: #e2e8f0;
    outline: none;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s;
}

.teachback-textarea:focus {
    border-color: #FBBF24;
}

.teachback-textarea::placeholder {
    color: #4a5568;
}

.btn-submit-teachback {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1d2e;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-teachback:hover {
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
    transform: translateY(-1px);
}

.btn-submit-teachback:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.teachback-result {
    margin-top: 0.75rem;
    border-radius: 8px;
    padding: 0.75rem;
    animation: fadeIn 0.3s ease;
}

.teachback-result.passed {
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid rgba(0, 220, 130, 0.3);
}

.teachback-result.needs-work {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.teachback-result.failed {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #FF6B6B;
}

.tb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tb-badge {
    font-weight: 600;
    font-size: 0.85rem;
}

.tb-score {
    font-weight: 700;
    font-size: 1rem;
    color: #f0f4f8;
}

.tb-feedback {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #cbd5e0;
    margin-bottom: 0.5rem;
}

.tb-missed {
    font-size: 0.75rem;
    color: #FF6B6B;
    margin-bottom: 0.4rem;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 107, 107, 0.08);
    border-radius: 4px;
}

.tb-suggestions {
    font-size: 0.75rem;
    color: #FBBF24;
    padding: 0.3rem 0.5rem;
    background: rgba(251, 191, 36, 0.08);
    border-radius: 4px;
}

.teachback-input {
    margin-bottom: 0.5rem;
}

.tutor-teaching-view {
    padding: 0.75rem;
}

.tutor-question-card {
    background: #252840;
    border: 1px solid #363a5c;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.tutor-question-number {
    font-size: 0.7rem;
    font-weight: 600;
    color: #4FB1FF;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tutor-question-text {
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.tutor-answer-group {
    display: flex;
    gap: 0.5rem;
}

.tutor-answer-input {
    flex: 1;
    background: #1a1d2e;
    border: 1px solid #363a5c;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.tutor-answer-input:focus {
    border-color: #4FB1FF;
}

.tutor-answer-input::placeholder {
    color: #4a5568;
}

.tutor-submit-btn {
    background: linear-gradient(135deg, #4FB1FF, #667eea);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tutor-submit-btn:hover {
    box-shadow: 0 2px 10px rgba(79, 177, 255, 0.4);
    transform: translateY(-1px);
}

.tutor-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tutor-feedback {
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.tutor-feedback.success {
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid rgba(0, 220, 130, 0.3);
    color: #00DC82;
}

.tutor-feedback.incorrect {
    background: rgba(252, 129, 129, 0.1);
    border: 1px solid rgba(252, 129, 129, 0.3);
    color: #fc8181;
}

.tutor-feedback.info {
    background: rgba(79, 177, 255, 0.1);
    border: 1px solid rgba(79, 177, 255, 0.3);
    color: #4FB1FF;
}

.tutor-feedback.reveal {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #FBBF24;
}

.tutor-review-lesson {
    margin-top: 0.5rem;
}

.tutor-review-btn {
    background: rgba(79, 177, 255, 0.12);
    border: 1px solid rgba(79, 177, 255, 0.3);
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4FB1FF;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.tutor-review-btn:hover {
    background: rgba(79, 177, 255, 0.2);
    border-color: rgba(79, 177, 255, 0.5);
}

.tutor-review-btn.active {
    background: rgba(79, 177, 255, 0.18);
    border-color: rgba(79, 177, 255, 0.5);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.tutor-review-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #1a1d30;
    border: 1px solid rgba(79, 177, 255, 0.2);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.tutor-review-content.expanded {
    max-height: 400px;
    overflow-y: auto;
}

.tutor-review-whiteboard {
    padding: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #d0d5e0;
}

.tutor-review-whiteboard code {
    background: rgba(79, 177, 255, 0.12);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #4FB1FF;
}

.tutor-review-whiteboard pre {
    background: #0d1017;
    border: 1px solid #363a5c;
    border-radius: 6px;
    padding: 0.6rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-size: 0.78rem;
}

.tutor-continue-btn {
    background: linear-gradient(135deg, #00DC82, #00c474);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0C1118;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.2s;
}

.tutor-continue-btn:hover {
    box-shadow: 0 2px 10px rgba(0, 220, 130, 0.4);
    transform: translateY(-1px);
}

.tutor-step-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.6rem;
    background: #252840;
    border-radius: 8px;
}

.tutor-step-progress .step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4FB1FF;
}

.tutor-step-progress .step-dots {
    display: flex;
    gap: 4px;
}

.tutor-step-progress .step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #363a5c;
    transition: background 0.3s;
}

.tutor-step-progress .step-dot.active {
    background: #4FB1FF;
}

.tutor-step-progress .step-dot.completed {
    background: #00DC82;
}

.tutor-lesson-content {
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    font-size: 0.84rem;
    color: #c9d1d9;
    overflow-x: auto;
}

.tutor-lesson-content h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #f0f4f8;
    margin-bottom: 0.6rem;
    margin-top: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #2d3148;
}

.tutor-lesson-content h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.4rem;
    margin-top: 0.3rem;
}

.tutor-lesson-content p {
    margin-bottom: 0.5rem;
}

.tutor-lesson-content strong {
    color: #f0f4f8;
}

.tutor-lesson-content code {
    background: #252840;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #4FB1FF;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.tutor-lesson-content pre {
    background: #12141f;
    border: 1px solid #2d3148;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    line-height: 1.5;
}

.tutor-lesson-content pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    display: block;
}

.tutor-lesson-content pre code .comment { color: #6a737d; }
.tutor-lesson-content pre code .keyword { color: #c792ea; }
.tutor-lesson-content pre code .string { color: #c3e88d; }
.tutor-lesson-content pre code .number { color: #f78c6c; }
.tutor-lesson-content pre code .function { color: #82aaff; }

.tutor-check-section {
    background: rgba(79, 177, 255, 0.06);
    border: 1px solid rgba(79, 177, 255, 0.2);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
}

.tutor-check-section .check-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4FB1FF;
    margin-bottom: 0.5rem;
}

.tutor-check-section .check-question {
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 0.65rem;
}

.tutor-mastery-quiz {
    animation: fadeIn 0.3s ease;
}

.tutor-quiz-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tutor-quiz-header .quiz-icon {
    font-size: 1.5rem;
}

.tutor-quiz-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f0f4f8;
}

.tutor-quiz-header small {
    font-size: 0.7rem;
    color: #8892b0;
    display: block;
    margin-top: 2px;
}

.tutor-quiz-complete {
    text-align: center;
    padding: 1.5rem 1rem;
    animation: fadeIn 0.3s ease;
}

.tutor-quiz-complete .quiz-result-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tutor-quiz-complete h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f0f4f8;
    margin-bottom: 0.4rem;
}

.tutor-quiz-complete .quiz-score {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.tutor-quiz-complete .quiz-score.passed { color: #00DC82; }
.tutor-quiz-complete .quiz-score.failed { color: #fc8181; }

.tutor-quiz-complete .quiz-message {
    font-size: 0.85rem;
    color: #8892b0;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.tutor-transition-card {
    background: #252840;
    border: 1px solid #363a5c;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.tutor-transition-card .transition-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tutor-transition-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f0f4f8;
    margin-bottom: 0.4rem;
}

.tutor-transition-card p {
    font-size: 0.82rem;
    color: #8892b0;
    margin-bottom: 0.75rem;
}

.coaching-nudge {
    margin: 0.5rem 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.coaching-nudge-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
}

.coaching-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.coaching-text {
    flex: 1;
    font-size: 0.82rem;
    color: #c4b5fd;
    line-height: 1.5;
}

.coaching-text code {
    background: rgba(99, 102, 241, 0.2);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.78rem;
}

.coaching-dismiss {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    flex-shrink: 0;
}

.coaching-dismiss:hover {
    color: #e2e8f0;
}

.study-notes-view {
    overflow-y: auto;
    height: 100%;
}

.study-notes-container {
    padding: 0.5rem;
}

.study-notes-intro {
    padding: 0.5rem 0.5rem 0.75rem;
    color: #8892b0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.study-notes-loading {
    text-align: center;
    padding: 2rem;
    color: #8892b0;
    font-size: 0.85rem;
}

.study-notes-topic {
    margin-bottom: 0.4rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2a2d45;
    transition: border-color 0.2s;
}

.study-notes-topic:hover {
    border-color: #3a3d5c;
}

.study-notes-topic-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.75rem;
    background: #1a1d30;
    border: none;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    transition: background 0.2s;
}

.study-notes-topic-btn:hover {
    background: #222540;
}

.study-notes-topic-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.study-notes-topic-title {
    flex: 1;
}

.study-notes-topic-count {
    font-size: 0.72rem;
    color: #8892b0;
    font-weight: 400;
    flex-shrink: 0;
}

.study-notes-chevron {
    color: #8892b0;
    font-size: 0.7rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.study-notes-topic.open > .study-notes-topic-btn .study-notes-chevron,
.study-notes-step.open > .study-notes-step-btn .study-notes-chevron {
    transform: rotate(90deg);
}

.study-notes-steps {
    display: none;
    background: #13152a;
}

.study-notes-topic.open > .study-notes-steps {
    display: block;
}

.study-notes-step {
    border-top: 1px solid #1e2040;
}

.study-notes-step-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem 0.55rem 1.2rem;
    background: transparent;
    border: none;
    color: #c8cfe0;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: left;
    transition: background 0.2s;
}

.study-notes-step-btn:hover {
    background: rgba(79, 177, 255, 0.06);
}

.study-notes-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(79, 177, 255, 0.15);
    color: #4FB1FF;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.study-notes-step-content {
    display: none;
    padding: 0.75rem 1rem;
    background: #0f1125;
    border-top: 1px solid #1e2040;
}

.study-notes-step.open > .study-notes-step-content {
    display: block;
}

.study-notes-whiteboard {
    font-size: 0.82rem;
    line-height: 1.65;
    color: #d0d5e0;
}

.study-notes-whiteboard h2 {
    font-size: 1rem;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.study-notes-whiteboard h3 {
    font-size: 0.9rem;
    color: #e2e8f0;
    margin: 0.75rem 0 0.35rem;
    font-weight: 600;
}

.study-notes-whiteboard p {
    margin-bottom: 0.5rem;
}

.study-notes-whiteboard code {
    background: rgba(79, 177, 255, 0.12);
    padding: 0.12rem 0.3rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #4FB1FF;
}

.study-notes-whiteboard pre {
    background: #0d1017;
    border: 1px solid #2a2d45;
    border-radius: 6px;
    padding: 0.65rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.5;
}

.study-notes-whiteboard pre code {
    background: none;
    padding: 0;
    color: #c8cfe0;
}

.study-notes-whiteboard ul,
.study-notes-whiteboard ol {
    margin: 0.4rem 0 0.4rem 1.2rem;
}

.study-notes-whiteboard li {
    margin-bottom: 0.25rem;
}

.study-notes-whiteboard strong {
    color: #e2e8f0;
}

.study-notes-try-btn {
    margin-top: 0.65rem;
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid rgba(0, 220, 130, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    color: #00DC82;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.study-notes-try-btn:hover {
    background: rgba(0, 220, 130, 0.2);
    border-color: rgba(0, 220, 130, 0.5);
}

.study-notes-pointer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.7rem;
    background: rgba(79, 177, 255, 0.06);
    border: 1px solid rgba(79, 177, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.78rem;
    color: #8892b0;
    text-decoration: none;
}

.study-notes-pointer:hover {
    background: rgba(79, 177, 255, 0.12);
    border-color: rgba(79, 177, 255, 0.3);
    color: #4FB1FF;
}

.study-notes-pointer .pointer-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.study-notes-pointer .pointer-text {
    flex: 1;
    line-height: 1.3;
}

.study-notes-pointer .pointer-arrow {
    color: #4FB1FF;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.exercise-task-banner {
    background: linear-gradient(135deg, rgba(79, 177, 255, 0.12) 0%, rgba(100, 255, 218, 0.08) 100%);
    border-bottom: 1px solid rgba(79, 177, 255, 0.25);
    padding: 0.6rem 0.8rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.exercise-task-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.exercise-task-icon {
    font-size: 1rem;
}

.exercise-task-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4FB1FF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exercise-task-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #8892b0;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.2rem;
    line-height: 1;
}

.exercise-task-close:hover {
    color: #e2e8f0;
}

.exercise-task-text {
    color: #ccd6f6;
    font-size: 0.82rem;
    line-height: 1.5;
}

.exercise-task-text ol,
.exercise-task-text ul {
    padding-left: 1.2rem;
    margin: 0.2rem 0;
}

.exercise-task-text li {
    margin-bottom: 0.15rem;
}

.exercise-task-text code {
    background: rgba(79, 177, 255, 0.15);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    color: #64ffda;
}

.mobile-tab-bar {
    display: none;
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    .studio-header {
        padding: 0.4rem 0.75rem;
    }

    .studio-logo .logo-wordmark {
        display: flex;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .logo-subtitle {
        font-size: 0.5rem;
    }

    .studio-controls {
        gap: 0.3rem;
    }

    .studio-controls .btn-nav,
    .studio-controls #backToDashboard,
    .studio-controls #signOutBtn {
        display: none;
    }

    .studio-controls .python-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .studio-controls .btn-primary {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    .mobile-tab-bar {
        display: flex;
        background: #1a1d2e;
        border-bottom: 1px solid #2d3148;
        padding: 0;
        flex-shrink: 0;
        z-index: 50;
    }

    .mobile-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 4px;
        background: none;
        border: none;
        border-bottom: 2px solid transparent;
        color: #8892b0;
        cursor: pointer;
        transition: all 0.2s;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px;
    }

    .mobile-tab.active {
        color: #4FB1FF;
        border-bottom-color: #4FB1FF;
        background: rgba(79, 177, 255, 0.05);
    }

    .mobile-tab-icon {
        font-size: 1.1rem;
    }

    .mobile-tab-label {
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .mobile-tab.has-output {
        color: #00DC82;
        border-bottom-color: #00DC82;
    }

    .mobile-tab.has-output .mobile-tab-icon::after {
        content: '';
        display: inline-block;
        width: 6px;
        height: 6px;
        background: #00DC82;
        border-radius: 50%;
        margin-left: 2px;
        vertical-align: top;
    }

    .studio-panels {
        flex: 1;
        flex-direction: column;
        position: relative;
        overflow: hidden;
    }

    .resize-handle {
        display: none;
    }

    .panel.tutor-panel,
    .panel.editor-panel,
    .panel.output-panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border: none !important;
        display: none;
    }

    .panel.mobile-active {
        display: flex !important;
    }

    .panel-header {
        padding: 0.4rem 0.6rem;
    }

    .panel-header h3 {
        font-size: 0.8rem;
    }

    .editor-toolbar {
        gap: 0.3rem;
    }

    .btn-run, .btn-submit, .btn-reset {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .filename {
        font-size: 0.65rem;
    }

    .curriculum-view {
        padding: 0.5rem;
    }

    .topic-card {
        padding: 0.5rem;
    }

    .topic-info strong {
        font-size: 0.78rem;
    }

    .lesson-view, .capstone-view, .tutor-teaching-view {
        padding: 0.5rem;
    }

    .step-title {
        font-size: 0.92rem;
    }

    .step-explanation p, .exercise-instruction p, .capstone-instructions p {
        font-size: 0.8rem;
    }

    .ask-guro-overlay {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .ask-guro-panel {
        width: 100%;
        max-height: 60vh;
    }

    .exercise-task-banner {
        font-size: 0.78rem;
    }

    .study-notes-view {
        padding: 0.5rem;
    }

    .study-notes-step {
        padding: 0.5rem;
    }

    .hint-bubble {
        font-size: 0.8rem;
    }

    .capstone-hint-panel {
        padding: 0.5rem;
    }
}

@media (max-width: 400px) {
    .studio-controls .python-badge {
        display: none;
    }

    .studio-controls .btn-primary span {
        display: none;
    }

    .mobile-tab {
        padding: 6px 2px;
    }

    .mobile-tab-icon {
        font-size: 1rem;
    }

    .mobile-tab-label {
        font-size: 0.6rem;
    }
}
