      body { font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; background: #f8fafc; margin: 0; padding: 0; color: #1e2937; }
        .container { max-width: 1200px; margin: 0 auto; padding: 20px 16px; }
        .header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
        h1 { font-size: 32px; font-weight: 700; margin: 0; color: #1e40af; display: flex; align-items: center; gap: 8px; }
        /* HERO */
        .hero { background: linear-gradient(135deg, #3b82f6, #1e40af); color: white; padding: 5px 5px; border-radius: 0 0 16px 16px; margin: 0 -16px 40px; text-align: center; }
        .hero h1 { font-size: 42px; margin: 0 0 16px 0; color: white; display: flex; align-items: center; justify-content: center; gap: 12px; }
        .hero ul {margin: 0 auto 20px auto; padding-left: 0; list-style: none; font-size: 18px; }
        .hero li { margin: 8px 0; }
        /* AUTH BUTTON */
        .auth-btn { background: #eee; color: #1e40af; border: none; padding: 12px 28px; font-size: 17px; font-weight: 700; border-radius: 9999px; cursor: pointer; transition: all 0.2s; }
        .auth-btn:hover { transform: scale(1.05); background: #f8fafc; }
        /* MODAL (unchanged) */
        .modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.65); align-items: center; justify-content: center; }
        .modal-content { background: white; padding: 30px 28px; border-radius: 20px; width: 90%; max-width: 460px; box-shadow: 0 20px 40px rgba(0,0,0,0.25); }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .close { font-size: 32px; font-weight: 300; cursor: pointer; color: #64748b; }
        .close:hover { color: #1e2937; }
        .tab { padding: 12px 24px; cursor: pointer; font-weight: 600; border-radius: 9999px; }
        .tab.active { background: #3b82f6; color: white; }
        .form-input { width: 100%; padding: 14px 16px; margin-bottom: 16px; border-radius: 9999px; border: 2px solid #e2e8f0; font-size: 16px; }
        /* LESSONS - UPDATED FOR IMAGE ON LEFT */
        .filters { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
        .filter-group { display: flex; flex-direction: column; gap: 4px; }
        .filter-label { font-size: 12px; font-weight: 700; color: #64748b; padding-left: 4px; }
        .toggle-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
        .toggle-btn {
            padding: 8px 16px;
            border: 2px solid #e2e8f0;
            background: #fff;
            border-radius: 9999px;
            font-size: 14px;
            font-weight: 600;
            color: #475569;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        .toggle-btn:hover { border-color: #94a3b8; transform: translateY(-1px); }
.toggle-btn.active {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.request-lesson-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.request-lesson-btn:hover {
    background: #059669;
}
        #lessons-container { display: grid; grid-template-columns: 1fr; gap: 20px; }
        .lesson-card.daily {
            border-color: #facc15 !important;
            background: #fffbeb !important;
            box-shadow: 0 4px 12px rgba(250, 204, 21, 0.2);
        }
        .lesson-card.daily:hover {
            border-color: #eab308 !important;
            transform: translateY(-3px);
        }
        @media (min-width: 768px) { #lessons-container { grid-template-columns: repeat(2, 1fr); } }
       
        .lesson-card {
            background: white;
            border: 1px solid #AAAAAA;
            border-radius: 12px;
            padding: 12px 16px;
            text-decoration: none;
            color: inherit;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }
        .lesson-card.in_progress { background: #fefce8 !important; border-color: #facc15; }
        .lesson-card.completed { background: #ecfdf5 !important; border-color: #34d399; }
        .lesson-card:hover {
            border-color: #3b82f6;
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(59,130,246,0.15);
        }
       
       .lesson-image {
    width: 64px; /* ← smaller */
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px; /* slightly softer corners */
    object-fit: cover;
    background: #f1f5f9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
       
        .lesson-content {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
        }
       
        .lesson-row1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        .lesson-name { font-size: 22px; font-weight: 600; margin: 0; flex: 1; }
.level-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px; /* smaller padding */
    border-radius: 9999px;
    font-size: 11px; /* smaller text */
    font-weight: 700;
    white-space: nowrap;
}
        .progress-badge { padding: 4px 12px; border-radius: 9999px; font-size: 13px; font-weight: 600; }
        .lesson-row2 { display: flex; justify-content: space-between; align-items: flex-end; }
        .lesson-theme { color: #64748b; font-size: 15px; margin: 0; }
        .lesson-types { display: flex; gap: 6px; flex-wrap: wrap; }
        .type-badge { background: #f1f5f9; color: #475569; padding: 4px 10px; border-radius: 9999px; font-size: 13px; }
        .exercise-count { font-size: 14px; color: #64748b; text-align: right; }
        .empty { background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c; padding: 40px 20px; border-radius: 20px; text-align: center; }
        .level-1 {color:#000000; background:#FFFFE0;}
        .level-2 {color:#000000; background:#FFD580;}
        .level-3 {color:#000000; background:#F08080;}
/* ========================================
   MOBILE FIX: Login button on its own row
   ======================================== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        text-align: center;
    }
   
    .header h1 {
        width: 100%;
        justify-content: center;
        margin-bottom: 6px;
    }
   
    .auth-btn {
        width: 100%;
        max-width: 280px;
        padding: 15px 36px;
        font-size: 17px;
        display: block;
        margin: 0 auto;
    }
   
    /* Logged-in stats + logout also look good when wrapped */
    .header > div {
        width: 100%;
        justify-content: center;
    }
}
/* ========================================
   MOBILE: Lesson cards - stacked left column
   ======================================== */
@media (max-width: 768px) {
    .lesson-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 10px 12px;
    }
    .lesson-sidebar {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 68px;
        flex-shrink: 0;
        gap: 6px;
    }
    .lesson-image {
        width: 64px !important;
        height: 64px !important;
        border-radius: 10px;
    }
    .level-badge {
        font-size: 10px;
        padding: 1px 7px;
        margin-top: 2px;
    }
    .exercise-count-mobile {
        font-size: 11px;
        color: #64748b;
        text-align: center;
        line-height: 1.1;
        font-weight: 500;
    }
    /* Hide old exercise count on mobile */
    .lesson-row2 > div[style*="text-align:right"] {
        display: none;
    }
    .lesson-content {
        flex: 1;
        min-width: 0;
    }
    .lesson-row1 {
        margin-bottom: 6px;
    }
    .toggle-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}
