/* ============================================
   Codemyplusplus - Complete Styles
   ============================================ */

/* Root Variables */
:root {
    --primary-orange: #f97316;
    --primary-purple: #8b5cf6;
    --primary-blue: #3b82f6;
    --primary-green: #22c55e;
    --primary-red: #ef4444;
    --primary-yellow: #eab308;
    --primary-pink: #ec4899;
    --primary-teal: #14b8a6;
    --primary-indigo: #6366f1;
    --primary-gold: #f59e0b;
    
    --bg-dark: #1a1a2e;
    --bg-card: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --gradient-orange: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-green: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Competitive Exams theme: indigo accent when user chose Exam path */
body.theme-exam .navbar,
body.theme-exam .nav-link.active {
    --primary-orange: #6366f1;
}
body.theme-exam .navbar { background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(79,70,229,0.06) 100%) !important; }

/* OMEGA §13: Dark theme */
html[data-theme="dark"] {
    --bg-card: #1e293b;
    --bg-light: #0f172a;
    --bg-gray: #334155;
    --text-dark: #f1f5f9;
    --text-gray: #94a3b8;
    --text-light: #64748b;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
}

/* ============================================
   HEADER STYLES
   ============================================ */

.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-orange);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg-gray);
    color: var(--text-dark);
}

/* Dropdown menu */
.nav-item-dropdown {
    position: relative;
}
.nav-item-dropdown .nav-link {
    padding-right: 1.5rem;
}
.nav-item-dropdown .nav-link::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.35rem 0;
    list-style: none;
    margin: 0.25rem 0 0 0;
    z-index: 1001;
    display: none;
}
.nav-dropdown li {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-item-dropdown:hover .nav-dropdown {
    display: block;
}
.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.nav-dropdown a:hover {
    background: var(--bg-gray);
    color: var(--text-dark);
}
.nav-dropdown a i {
    width: 1.1em;
    opacity: 0.85;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.xp-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.xp-display:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

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

/* Notification bell – always visible in navbar (mobile + desktop) */
.notification-bell-navbar {
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .notification-bell-navbar {
        order: 2;
        margin-left: 0.5rem;
    }
}

.notification-bell-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0 0.2rem;
}

.notification-bell-wrap .notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
}

.notification-bell {
    position: relative;
    overflow: visible;
    cursor: pointer;
    color: #64748b;
    color: var(--text-gray, #64748b);
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: transparent;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background: rgba(249, 115, 22, 0.14);
    color: var(--primary-orange);
    border-color: rgba(249, 115, 22, 0.25);
}

.notification-bell:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

.notification-bell .notification-bell-icon {
    transition: transform 0.3s ease, color 0.2s;
    display: inline-block;
}

.notification-bell:hover .notification-bell-icon {
    transform: rotate(-15deg) scale(1.06);
}

.notification-bell.has-notifications {
    color: var(--primary-orange);
    border-color: rgba(249, 115, 22, 0.4);
    background: rgba(249, 115, 22, 0.1);
}

.notification-bell.has-notifications .notification-bell-icon {
    color: var(--primary-orange);
    animation: notif-bell-tinkle 2.2s ease-in-out infinite;
}

.notification-bell.has-notifications:hover {
    background: rgba(249, 115, 22, 0.2);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.22);
}

@keyframes notif-bell-tinkle {
    0%, 100% { transform: rotate(0) scale(1); }
    12%, 28% { transform: rotate(-14deg) scale(1.05); }
    20%, 36% { transform: rotate(14deg) scale(1.05); }
    50% { transform: rotate(0) scale(1); }
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: linear-gradient(145deg, #f97316, #ea580c);
    color: #fff !important;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-body, #fff);
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s;
    line-height: 1;
}

[data-theme="dark"] .notification-badge {
    border-color: var(--bg-body);
}

.notification-bell:hover .notification-badge {
    transform: scale(1.08);
    box-shadow: 0 3px 14px rgba(249, 115, 22, 0.6);
}

.notification-badge.has-count {
    animation: notif-badge-pulse 2.5s ease-in-out infinite;
}

.notification-badge.notif-badge-critical {
    background: linear-gradient(145deg, #dc2626, #b91c1c);
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.5);
    animation: notif-badge-critical-pulse 1.8s ease-in-out infinite;
}

@keyframes notif-badge-critical-pulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(220, 38, 38, 0.5); }
    50% { box-shadow: 0 3px 18px rgba(220, 38, 38, 0.8); }
}

@keyframes notif-badge-pulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(249, 115, 22, 0.5); }
    50% { box-shadow: 0 3px 18px rgba(249, 115, 22, 0.7); }
}

.notification-badge.hidden {
    display: none !important;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-gray);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    transition: background 0.2s;
}

.user-profile:hover {
    background: var(--bg-gray);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

.user-profile:hover .profile-avatar {
    border-color: var(--primary-orange);
}

/* Notification Dropdown – universal top menu */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 360px;
    max-width: 92vw;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 0 0 1px var(--border-color);
    z-index: 1001;
    overflow: hidden;
    display: none;
    flex-direction: column;
    max-height: 420px;
    animation: dropdownFadeIn 0.2s ease;
}

[data-theme="dark"] .notification-dropdown {
    background: var(--bg-card);
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.notification-dropdown.open {
    display: flex;
}

.notification-dropdown .notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(249,115,22,0.06), transparent);
}

.notification-dropdown .notif-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.notification-dropdown .notif-header-sub {
    font-size: 0.72rem;
    color: var(--text-gray);
    font-weight: 500;
}

.notification-dropdown .notif-header h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.notification-dropdown .notif-header h4 i {
    color: var(--primary-orange);
}

.notification-dropdown .notif-view-all {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-orange);
    text-decoration: none;
    transition: color 0.2s;
}

.notification-dropdown .notif-view-all:hover {
    color: #ea580c;
}

.notification-dropdown .notif-header-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-left: 0.15rem;
}

.notification-dropdown .notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-dropdown .notif-loading {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.notification-dropdown .notif-item {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.notification-dropdown .notif-item.notif-priority-normal {
    border-left-color: rgba(0, 0, 0, 0.06);
}
.notification-dropdown .notif-item::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-gray);
    opacity: 0;
    transition: opacity 0.2s, right 0.2s;
}
.notification-dropdown .notif-item:hover::after {
    opacity: 0.7;
    right: 0.85rem;
}

.notification-dropdown .notif-item:hover {
    background: rgba(249, 115, 22, 0.08);
}

.notification-dropdown .notif-item.notif-priority-critical {
    border-left: 4px solid #dc2626;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.12), rgba(239, 68, 68, 0.06));
}

.notification-dropdown .notif-item.notif-priority-critical:hover {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.18), rgba(239, 68, 68, 0.1));
}

.notification-dropdown .notif-item.notif-priority-critical .notif-title {
    color: #b91c1c;
    font-weight: 700;
}

.notification-dropdown .notif-item.notif-priority-critical .notif-icon {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.notification-dropdown .notif-item.notif-priority-high {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}

.notification-dropdown .notif-item.notif-priority-high:hover {
    background: rgba(245, 158, 11, 0.1);
}

.notification-dropdown .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.12);
    color: var(--primary-purple);
}

.notification-dropdown .notif-icon.notif-icon-critical {
    background: rgba(220, 38, 38, 0.22);
    color: #b91c1c;
}

.notification-dropdown .notif-icon.notif-icon-high {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.notification-dropdown .notif-content {
    flex: 1;
    min-width: 0;
    padding-right: 1.25rem;
}

.notification-dropdown .notif-content .notif-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 0.2rem;
    line-height: 1.3;
    color: var(--text-dark);
}

.notification-dropdown .notif-content .notif-msg {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.35;
}

.notification-dropdown .notif-content .notif-time {
    font-size: 0.72rem;
    color: var(--text-gray);
    margin-top: 0.35rem;
    display: block;
}

.notification-dropdown .notif-empty {
    padding: 1.75rem 1.25rem;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
    display: none;
}

.notification-dropdown .notif-empty i {
    display: block;
    font-size: 2rem;
    color: var(--border-color);
    margin-bottom: 0.5rem;
}

.notification-dropdown .notif-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light, #f8fafc);
}

.notification-dropdown .mark-read {
    background: none;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-orange);
    cursor: pointer;
    padding: 0.35rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
}

.notification-dropdown .mark-read:hover {
    color: #ea580c;
}

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

/* Notification panel — clearer hierarchy, scrollable list */
.notification-dropdown.codemy-notif-panel {
    width: min(400px, 94vw);
    max-height: min(85vh, 520px);
}
.notification-dropdown .notif-list.notif-list-scroll {
    flex: 1 1 auto;
    min-height: 100px;
    max-height: min(50vh, 360px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}
.notification-dropdown .notif-empty span {
    display: inline-block;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
}
.notification-dropdown .notif-empty .notif-empty-hint {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Global strip: user has no exam targets */
.exam-target-global-banner {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(245, 158, 11, 0.1));
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}
[data-theme="dark"] .exam-target-global-banner {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(245, 158, 11, 0.12));
    border-bottom-color: rgba(148, 163, 184, 0.25);
}

.exam-setup-inline-alert,
.exam-focus-switcher-card {
    animation: dropdownFadeIn 0.25s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.3); }
    50% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-purple {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary {
    background: var(--gradient-orange);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-gray);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-success {
    background: var(--gradient-green);
    color: white;
}

.btn-purple {
    background: var(--gradient-purple);
    color: white;
}

.btn-purple:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-challenge {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    margin-top: 1rem;
}

.btn-challenge.orange {
    background: var(--gradient-orange);
    color: white;
}

.btn-challenge.purple {
    background: var(--gradient-purple);
    color: white;
}

.btn-challenge.green {
    background: var(--gradient-green);
    color: white;
}

.btn-challenge.completed {
    background: var(--bg-gray);
    color: var(--text-gray);
    cursor: default;
}

.btn-challenge.in-progress {
    background: var(--gradient-blue);
    color: white;
}

.full-width {
    width: 100%;
    justify-content: center;
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats-section {
    padding: 2rem;
    max-width: 1200px;
    margin: -2rem auto 0;
    position: relative;
    z-index: 10;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.blue { background: #dbeafe; color: var(--primary-blue); }
.stat-icon.red { background: #fee2e2; color: var(--primary-red); }
.stat-icon.green { background: #dcfce7; color: var(--primary-green); }
.stat-icon.yellow { background: #fef9c3; color: var(--primary-yellow); }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ============================================
   PROGRESS SECTION
   ============================================ */

.progress-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-title i {
    color: var(--primary-orange);
}

.progress-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.user-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-avatar-large {
    position: relative;
}

.user-avatar-large img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--primary-orange);
}

.level-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--primary-purple);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
}

.user-details h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.user-role {
    color: var(--primary-orange);
    font-size: 0.85rem;
    font-weight: 500;
}

.user-status {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.user-xp {
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-purple);
}

.level-info {
    margin-bottom: 1.5rem;
}

.level-info > span {
    font-size: 0.9rem;
    font-weight: 600;
}

.xp-progress-bar {
    height: 10px;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    margin: 0.5rem 0;
    overflow: hidden;
}

.xp-progress {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: var(--radius-full);
    transition: width 0.8s ease;
    position: relative;
}

.xp-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.xp-needed {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 400;
}

.user-stats-row {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.user-stat:hover {
    background: var(--bg-gray);
}

.user-stat i {
    font-size: 1.25rem;
    color: var(--primary-orange);
}

.user-stat .stat-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.user-stat .stat-text {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.recent-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.badge-icons {
    display: flex;
    gap: 0.5rem;
}

.mini-badge {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.mini-badge:hover {
    transform: scale(1.2);
}

.mini-badge.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.progress-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.streak-card,
.achievement-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
}

.streak-header,
.achievement-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.streak-header i { color: var(--primary-orange); }
.achievement-header i { color: var(--primary-yellow); }

.streak-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-orange);
}

.streak-text {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.achievement-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.achievement-progress {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.achievement-progress-bar {
    height: 6px;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    margin-top: 0.75rem;
    overflow: hidden;
}

.achievement-progress-fill {
    height: 100%;
    background: var(--gradient-orange);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ============================================
   CHALLENGES SECTION
   ============================================ */

.challenges-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.view-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s;
}

.view-all:hover {
    gap: 0.75rem;
}

.challenges-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.challenge-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.challenge-card.featured {
    border-color: var(--primary-purple);
}

.challenge-card.completed {
    opacity: 0.7;
    border-color: var(--primary-green);
}

.challenge-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    margin-bottom: 0.75rem;
}

.challenge-badge.easy { background: #dcfce7; color: #166534; }
.challenge-badge.medium { background: #fef3c7; color: #92400e; }
.challenge-badge.hard { background: #fce7f3; color: #9d174d; }

.hot-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: hotPulse 1.5s infinite;
}

@keyframes hotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.challenge-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.challenge-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.challenge-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-light);
}

.meta-value {
    font-size: 0.85rem;
    font-weight: 600;
}

.meta-value.reward {
    color: var(--primary-green);
}

.status-available { color: var(--primary-green); }
.status-in-progress { color: var(--primary-blue); }
.status-completed { color: var(--text-gray); }

/* Streak Bonus Card */
.streak-bonus-card {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.streak-bonus-card.claimed {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.streak-bonus-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.streak-bonus-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-orange);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.streak-bonus-card.claimed .streak-bonus-icon {
    background: var(--primary-green);
}

.streak-bonus-text h4 {
    font-size: 1rem;
    font-weight: 700;
}

.streak-bonus-text p {
    font-size: 0.85rem;
    color: #92400e;
}

.streak-bonus-card.claimed .streak-bonus-text p {
    color: #166534;
}

/* ============================================
   COURSES SECTION
   ============================================ */

.courses-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.courses-section .section-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}

/* Category Tabs - Udemy Style */
.course-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.course-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.course-tab:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

.course-tab.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}

.course-tab i {
    font-size: 1rem;
}

.course-tab .tab-count {
    background: var(--bg-gray);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.course-tab.active .tab-count {
    background: var(--primary-purple);
    color: white;
}

/* Courses Grid - Udemy Style */
.courses-grid-container {
    margin-bottom: 2rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Course Card - Udemy Style */
.course-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.course-card-thumbnail {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.course-card-thumbnail .course-icon-large {
    font-size: 4rem;
    opacity: 0.9;
}

.course-card-thumbnail .course-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.course-card:hover .course-overlay {
    opacity: 1;
}

.course-card-thumbnail .play-btn {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-purple);
    transform: scale(0.8);
    transition: transform 0.3s;
}

.course-card:hover .play-btn {
    transform: scale(1);
}

.course-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.course-card-badge.bestseller {
    background: #fef3c7;
    color: #92400e;
}

.course-card-badge.new {
    background: #dcfce7;
    color: #166534;
}

.course-card-badge.hot {
    background: #fee2e2;
    color: #991b1b;
}

.course-card-badge.enrolled {
    background: var(--primary-purple);
    color: white;
}

.course-card-body {
    padding: 1rem;
}

.course-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-desc {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-instructor {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.course-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.course-card-rating .rating-score {
    font-size: 0.85rem;
    font-weight: 700;
    color: #b4690e;
}

.course-card-rating .stars {
    color: #e59819;
    font-size: 0.75rem;
}

.course-card-rating .rating-count {
    font-size: 0.75rem;
    color: var(--text-light);
}

.course-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.course-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.course-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.course-card-price.free {
    color: var(--primary-green);
}

.course-card-progress {
    flex: 1;
}

.course-card-progress .progress-text {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.course-card-progress .progress-bar-mini {
    height: 6px;
    background: var(--bg-gray);
    border-radius: 3px;
    overflow: hidden;
}

.course-card-progress .progress-bar-mini .fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 3px;
}

.course-card-btn {
    padding: 0.5rem 1rem;
    background: var(--gradient-purple);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.course-card-btn:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Load More */
.load-more-container {
    text-align: center;
    padding: 1rem 0;
}

/* Color backgrounds for course thumbnails */
.course-thumb-yellow { background: linear-gradient(135deg, #fef9c3 0%, #fde047 100%); color: #854d0e; }
.course-thumb-blue { background: linear-gradient(135deg, #dbeafe 0%, #60a5fa 100%); color: #1e40af; }
.course-thumb-green { background: linear-gradient(135deg, #dcfce7 0%, #4ade80 100%); color: #166534; }
.course-thumb-red { background: linear-gradient(135deg, #fee2e2 0%, #f87171 100%); color: #991b1b; }
.course-thumb-purple { background: linear-gradient(135deg, #ede9fe 0%, #a78bfa 100%); color: #5b21b6; }
.course-thumb-orange { background: linear-gradient(135deg, #ffedd5 0%, #fb923c 100%); color: #9a3412; }
.course-thumb-pink { background: linear-gradient(135deg, #fce7f3 0%, #f472b6 100%); color: #9d174d; }
.course-thumb-teal { background: linear-gradient(135deg, #ccfbf1 0%, #2dd4bf 100%); color: #115e59; }
.course-thumb-indigo { background: linear-gradient(135deg, #e0e7ff 0%, #818cf8 100%); color: #3730a3; }
.course-thumb-black { background: linear-gradient(135deg, #334155 0%, #1e293b 100%); color: #f1f5f9; }

@media (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .course-tabs {
        gap: 0.25rem;
    }
    
    .course-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .course-tab .tab-count {
        display: none;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-card-thumbnail {
        height: 140px;
    }
}

/* Old styles kept for modal compatibility */
.course-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.category-card .category-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 0.75rem;
}

.category-card .category-icon.orange { background: #ffedd5; color: var(--primary-orange); }
.category-card .category-icon.purple { background: #ede9fe; color: var(--primary-purple); }
.category-card .category-icon.blue { background: #dbeafe; color: var(--primary-blue); }
.category-card .category-icon.green { background: #dcfce7; color: var(--primary-green); }
.category-card .category-icon.teal { background: #ccfbf1; color: var(--primary-teal); }
.category-card .category-icon.indigo { background: #e0e7ff; color: var(--primary-indigo); }
.category-card .category-icon.pink { background: #fce7f3; color: var(--primary-pink); }

.category-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-card .course-count {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.featured-courses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.featured-course-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.featured-course-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-purple);
}

.featured-course-card .course-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.featured-course-card .course-info {
    flex: 1;
    min-width: 0;
}

.featured-course-card .course-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-course-card .course-info p {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.featured-course-card .course-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.featured-course-card .course-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-course-card .enrolled-badge {
    background: var(--primary-green);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .course-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-courses {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .course-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-card .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ============================================
   TOP PERFORMERS SECTION
   ============================================ */

.performers-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.performers-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
}

.leaderboard-panel,
.badges-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

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

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.panel-header h3 i {
    color: var(--primary-yellow);
}

.view-full {
    color: var(--primary-purple);
    font-size: 0.85rem;
    font-weight: 600;
}

.leaderboard-subtitle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-subtitle i {
    color: var(--primary-yellow);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    cursor: pointer;
}

.leaderboard-item:hover {
    background: var(--bg-gray);
    transform: translateX(4px);
}

.leaderboard-item.current-user {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.rank {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-gray);
    width: 30px;
    text-align: center;
}

.rank.gold { color: #f59e0b; }
.rank.silver { color: #9ca3af; }
.rank.bronze { color: #d97706; }

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

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

.leaderboard-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.leaderboard-title {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.leaderboard-xp {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.xp-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

.xp-label {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.rank-change {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
}

.rank-change.up {
    color: var(--primary-green);
    background: #dcfce7;
}

.rank-change.down {
    color: var(--primary-red);
    background: #fee2e2;
}

/* Featured Badges */
.badges-panel h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.badges-panel h3 i {
    color: var(--primary-yellow);
}

.featured-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.featured-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.featured-badge:hover {
    background: var(--bg-gray);
    transform: translateY(-2px);
}

.featured-badge .badge-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.featured-badge span {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
}

.badge-icon.red { background: #fee2e2; color: var(--primary-red); }
.badge-icon.orange { background: #ffedd5; color: var(--primary-orange); }
.badge-icon.purple { background: #ede9fe; color: var(--primary-purple); }
.badge-icon.blue { background: #dbeafe; color: var(--primary-blue); }
.badge-icon.green { background: #dcfce7; color: var(--primary-green); }
.badge-icon.yellow { background: #fef9c3; color: var(--primary-yellow); }

/* ============================================
   FORUMS SECTION
   ============================================ */

.forums-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.forums-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.forums-header {
    margin-bottom: 2rem;
}

.forums-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.forums-header h2 i {
    color: var(--primary-purple);
}

.forums-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.forums-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.forum-feature {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    cursor: pointer;
}

.forum-feature:hover {
    background: var(--bg-gray);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-icon.purple { background: #ede9fe; color: var(--primary-purple); }
.feature-icon.orange { background: #ffedd5; color: var(--primary-orange); }
.feature-icon.blue { background: #dbeafe; color: var(--primary-blue); }
.feature-icon.green { background: #dcfce7; color: var(--primary-green); }

.feature-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.feature-text p {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.recent-discussions .discussions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recent-discussions h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.discussion-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discussion-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.discussion-item:hover {
    background: var(--bg-gray);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.discussion-content {
    flex: 1;
    position: relative;
}

.hot-indicator {
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary-red);
    animation: hotPulse 1.5s infinite;
}

.discussion-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
    line-height: 1.4;
}

.discussion-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.tag.purple { background: #ede9fe; color: var(--primary-purple); }
.tag.green { background: #dcfce7; color: var(--primary-green); }
.tag.blue { background: #dbeafe; color: var(--primary-blue); }
.tag.orange { background: #ffedd5; color: var(--primary-orange); }
.tag.red { background: #fee2e2; color: var(--primary-red); }

.discussion-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.discussion-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.discussion-author .time {
    color: var(--text-light);
}

.discussion-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-gray);
    flex-shrink: 0;
    margin-left: 1rem;
}

.discussion-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.discussion-stats span i {
    transition: color 0.2s;
}

.discussion-stats span:hover i {
    color: var(--primary-purple);
}

.view-all-forums {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.view-all-forums:hover {
    background: var(--bg-gray);
}

/* ============================================
   BADGE COLLECTION SECTION
   ============================================ */

.badge-collection-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.badge-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    opacity: 0.6;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.badge-card.unlocked {
    opacity: 1;
    border-color: var(--primary-green);
}

.badge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    opacity: 1;
}

.badge-icon-large {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 0.75rem;
}

.badge-icon-large.red { background: #fee2e2; color: var(--primary-red); }
.badge-icon-large.orange { background: #ffedd5; color: var(--primary-orange); }
.badge-icon-large.purple { background: #ede9fe; color: var(--primary-purple); }
.badge-icon-large.yellow { background: #fef9c3; color: var(--primary-yellow); }
.badge-icon-large.green { background: #dcfce7; color: var(--primary-green); }
.badge-icon-large.blue { background: #dbeafe; color: var(--primary-blue); }
.badge-icon-large.gold { background: #fef3c7; color: #f59e0b; }
.badge-icon-large.teal { background: #ccfbf1; color: var(--primary-teal); }
.badge-icon-large.pink { background: #fce7f3; color: var(--primary-pink); }
.badge-icon-large.indigo { background: #e0e7ff; color: var(--primary-indigo); }

.badge-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.badge-card p {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.badge-card .progress-text {
    font-size: 0.7rem;
    color: var(--primary-purple);
    font-weight: 600;
}

.badge-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    background: var(--primary-green);
    color: white;
}

.badge-status.locked {
    background: var(--bg-gray);
    color: var(--text-light);
}

.unlock-progress {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.unlock-progress h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.unlock-progress > p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.unlock-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.unlock-icons {
    display: flex;
    gap: 0.25rem;
}

.unlock-bar {
    height: 8px;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    margin-top: 1rem;
    overflow: hidden;
}

.unlock-bar-fill {
    height: 100%;
    background: var(--gradient-green);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    padding: 4rem 2rem;
    background: var(--gradient-purple);
    margin-top: 2rem;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

.cta-container h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-container p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cta-primary {
    background: var(--primary-orange);
    color: white;
    padding: 0.85rem 1.75rem;
}

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

.btn-cta-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-card);
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-column a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary-purple);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a:hover {
    color: var(--primary-purple);
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-gray);
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

/* Form Styles in Modal */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--primary-blue);
}

.toast.success { border-left-color: var(--primary-green); }
.toast.error { border-left-color: var(--primary-red); }
.toast.warning { border-left-color: var(--primary-yellow); }

.toast.removing {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon { color: var(--primary-green); }
.toast.error .toast-icon { color: var(--primary-red); }
.toast.warning .toast-icon { color: var(--primary-yellow); }
.toast.info .toast-icon { color: var(--primary-blue); }

.toast-content {
    flex: 1;
}

.toast-content p {
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
}

.toast-close:hover {
    color: var(--text-dark);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ============================================
   COURSE CARD STYLES
   ============================================ */

.course-list {
    display: grid;
    gap: 1rem;
}

.course-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.course-item:hover {
    background: var(--bg-gray);
    transform: translateX(4px);
}

.course-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.course-info {
    flex: 1;
}

.course-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.course-info p {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.course-progress {
    text-align: right;
}

.course-progress .percentage {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-purple);
}

.course-progress .lessons {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.progress-bar-small {
    height: 4px;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    margin-top: 0.5rem;
    width: 80px;
    overflow: hidden;
}

.progress-bar-small .fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: var(--radius-full);
}

/* ============================================
   PROFILE DROPDOWN
   ============================================ */

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 280px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}

.profile-dropdown-header {
    padding: 1.25rem;
    background: var(--gradient-purple);
    color: white;
    text-align: center;
}

.profile-dropdown-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    margin-bottom: 0.75rem;
}

.profile-dropdown-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

.profile-dropdown-header p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.profile-dropdown-menu {
    padding: 0.5rem;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.profile-dropdown-item:hover {
    background: var(--bg-gray);
}

.profile-dropdown-item i {
    width: 20px;
    color: var(--text-gray);
}

.profile-dropdown-item.logout {
    color: var(--primary-red);
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.profile-dropdown-item.logout i {
    color: var(--primary-red);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-container {
        grid-template-columns: 1fr;
    }
    
    .challenges-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .performers-container {
        grid-template-columns: 1fr;
    }
    
    .forums-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .badge-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-item-dropdown:hover .nav-dropdown {
        display: block;
    }
    
    .nav-dropdown {
        position: absolute;
        left: 0;
        margin-top: 0.15rem;
    }
    
    .nav-link span {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .challenges-container {
        grid-template-columns: 1fr;
    }
    
    .forums-features {
        grid-template-columns: 1fr;
    }
    
    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .streak-bonus-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
    
    .discussion-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .discussion-stats {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .badge-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .featured-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-right {
        gap: 1rem;
    }
    
    .user-profile span {
        display: none;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.animate-in {
    animation: fadeInUp 0.5s ease-out;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: var(--primary-purple);
    color: white;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* ============================================
   COURSE LEARNING INTERFACE
   ============================================ */

.modal.fullscreen {
    width: 95vw;
    max-width: 1400px;
    height: 90vh;
    max-height: 90vh;
}

.modal.fullscreen .modal-body {
    padding: 0;
    overflow: hidden;
    height: calc(90vh - 60px);
}

.course-learning-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100%;
    overflow: hidden;
}

.course-sidebar {
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.course-sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.course-sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-progress-mini {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.progress-bar-mini {
    height: 4px;
    background: var(--bg-gray);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-bar-mini .fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 2px;
    transition: width 0.3s;
}

.lesson-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.lesson-item:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.lesson-item.active {
    background: white;
    box-shadow: var(--shadow-md);
    border-left: 3px solid var(--primary-purple);
}

.lesson-item.completed .lesson-status {
    color: var(--primary-green);
}

.lesson-item.completed .lesson-title {
    color: var(--text-gray);
}

.lesson-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-gray);
    flex-shrink: 0;
}

.lesson-status.quiz {
    background: var(--gradient-orange);
    color: white;
}

.lesson-number {
    font-size: 0.75rem;
}

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

.lesson-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-duration {
    font-size: 0.7rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lesson-item.quiz-item {
    margin-top: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
}

.lesson-item.quiz-item:hover {
    box-shadow: var(--shadow-md);
}

/* Main Content Area */
.course-main-content {
    overflow-y: auto;
    background: var(--bg-light);
}

.lesson-content-wrapper {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.lesson-header {
    margin-bottom: 2rem;
}

.lesson-badge {
    display: inline-block;
    background: var(--gradient-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lesson-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.lesson-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.lesson-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.completed-badge {
    color: var(--primary-green);
    font-weight: 600;
}

/* Lesson Text Content */
.lesson-text-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.lesson-text-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-purple);
}

.lesson-text-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

.lesson-text-content p {
    line-height: 1.7;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.lesson-text-content ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.lesson-text-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.lesson-text-content code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85em;
    color: var(--primary-purple);
}

/* Code Editor Section */
.code-section {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.code-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.code-section-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-code {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-code:hover {
    background: var(--bg-light);
}

.btn-code.primary {
    background: var(--gradient-green);
    color: white;
    border: none;
}

.btn-code.primary:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.code-editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.code-editor {
    border-right: 1px solid var(--border-color);
}

.code-editor-header,
.code-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #1e293b;
    color: #94a3b8;
    font-size: 0.75rem;
}

.language-badge {
    background: var(--primary-purple);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.code-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    background: #0f172a;
    color: #e2e8f0;
    border: none;
    resize: vertical;
}

.code-textarea:focus {
    outline: none;
}

.code-output {
    background: #0f172a;
}

.btn-clear {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    cursor: pointer;
}

.btn-clear:hover {
    background: #334155;
}

.output-content {
    padding: 1rem;
    min-height: 300px;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #94a3b8;
    overflow-y: auto;
}

.output-placeholder {
    color: #64748b;
    font-style: italic;
}

.output-running {
    color: #60a5fa;
}

.output-success {
    color: #4ade80;
    white-space: pre-wrap;
    margin: 0;
}

.output-error {
    color: #f87171;
    white-space: pre-wrap;
    margin: 0;
}

/* Lesson Navigation */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

/* Quiz Container */
.quiz-container {
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.quiz-progress {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.quiz-progress-bar {
    height: 6px;
    background: var(--bg-gray);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.quiz-progress-bar .fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 3px;
    transition: width 0.3s;
}

.quiz-question-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.quiz-question-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.quiz-option:hover {
    background: white;
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-sm);
}

.quiz-option.correct {
    background: #dcfce7;
    border-color: var(--primary-green);
}

.quiz-option.incorrect {
    background: #fee2e2;
    border-color: var(--primary-red);
}

.option-letter {
    width: 32px;
    height: 32px;
    background: var(--bg-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.quiz-option.correct .option-letter {
    background: var(--primary-green);
    color: white;
}

.quiz-option.incorrect .option-letter {
    background: var(--primary-red);
    color: white;
}

.option-text {
    flex: 1;
    font-size: 0.95rem;
}

.quiz-score-display {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Quiz Result */
.quiz-result {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-icon.success {
    animation: bounce 0.5s ease;
}

.quiz-result h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.quiz-result p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.xp-earned {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-green);
}

.retry-message {
    color: var(--primary-orange);
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsive for Course Learning */
/* Hide toggle button on desktop */
.lesson-sidebar-toggle {
    display: none;
}

@media (max-width: 900px) {
    .course-learning-container {
        grid-template-columns: 1fr;
        position: relative;
    }

    .course-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        background: white;
        border-right: 1px solid var(--border-color);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .course-sidebar.mobile-open {
        transform: translateX(0);
    }

    .lesson-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        background: white;
        cursor: pointer;
        color: var(--text-gray);
        font-size: 1.1rem;
        transition: all 0.2s;
        margin-right: 1rem;
    }

    .lesson-sidebar-toggle:hover {
        background: var(--bg-light);
        color: var(--primary-purple);
        border-color: var(--primary-purple);
    }
    
    .code-editor-container {
        grid-template-columns: 1fr;
    }
    
    .code-editor {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .code-textarea,
    .output-content {
        min-height: 200px;
    }
    
    .lesson-content-wrapper {
        padding: 1rem;
    }
}

@media (max-width: 900px) {
    .lesson-sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 600px) {
    .modal.fullscreen {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .quiz-question-card {
        padding: 1.25rem;
    }
    
    .quiz-option {
        padding: 0.75rem;
    }
}
