/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-hover: #2d3748;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 70px;
}

/* Light theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.logo-text {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar.collapsed .nav-label {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar.collapsed .user-info {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary);
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    width: 400px;
    max-width: 100%;
}

.header-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.header-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Content Sections */
.content-section {
    display: none;
    padding: 24px;
    flex: 1;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.stat-icon.python {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.stat-icon.javascript {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.stat-icon.java {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.stat-icon.fire {
    background: rgba(249, 115, 22, 0.2);
    font-size: 1.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

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

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

.stat-progress {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.streak-flame {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

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

.lesson-icon.python {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.lesson-icon.javascript {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.lesson-details {
    flex: 1;
}

.lesson-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.lesson-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.lesson-progress {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.btn-continue {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-continue:hover {
    background: var(--primary-dark);
}

.challenge-content {
    text-align: center;
}

.challenge-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--secondary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.challenge-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.challenge-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.challenge-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-details p {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.activity-details span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Subjects Section */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.subject-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

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

.subject-header {
    padding: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.subject-header.python-bg {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.subject-header.javascript-bg {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.subject-header.java-bg {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.subject-header.csharp-bg {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.subject-header.cpp-bg {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.subject-header.go-bg {
    background: linear-gradient(135deg, #10b981, #059669);
}

.subject-icon {
    color: white;
    opacity: 0.9;
}

.subject-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.subject-content {
    padding: 20px;
}

.subject-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subject-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.subject-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.subject-progress {
    margin-bottom: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.progress-info span:first-child {
    color: var(--text-secondary);
}

.progress-info span:last-child {
    color: var(--primary);
    font-weight: 600;
}

/* Revision Notes Section */
.revision-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.revision-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 94px;
}

.revision-search input {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.revision-search input::placeholder {
    color: var(--text-muted);
}

.revision-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.category-item:hover {
    background: var(--bg-hover);
}

.category-item.active {
    background: var(--primary);
    color: white;
}

.category-item .count {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.category-item.active .count {
    background: rgba(255, 255, 255, 0.2);
}

.revision-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.revision-note {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.note-language {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.note-language.python {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.note-language.javascript {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.note-language.java {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.note-language.csharp {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.note-language.cpp {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
}

.note-header h3 {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
}

.note-header .copy-btn {
    width: 32px;
    height: 32px;
}

.note-body {
    padding: 20px;
}

.note-body p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.note-body pre {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    padding: 16px;
    overflow-x: auto;
}

.note-body code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
}

.note-footer {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.note-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.note-date {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Video Summary Section */
.videos-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.video-player {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.video-placeholder svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
}

.control-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.video-controls .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    cursor: pointer;
}

.time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.video-info {
    margin-top: 20px;
}

.video-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.video-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.video-description {
    margin-top: 16px;
}

.video-description strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.video-description ul {
    margin: 12px 0;
    padding-left: 20px;
}

.video-description li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.chapter-item:hover {
    background: var(--bg-hover);
}

.chapter-item.active {
    background: var(--primary);
}

.chapter-num {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.chapter-item.active .chapter-num {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.chapter-title {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.chapter-item.active .chapter-title {
    color: white;
}

.chapter-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chapter-item.active .chapter-time {
    color: rgba(255, 255, 255, 0.7);
}

.video-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-notes {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.video-notes h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.notes-editor textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    resize: vertical;
}

.notes-editor textarea::placeholder {
    color: var(--text-muted);
}

.notes-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.video-playlist {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.video-playlist h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-item:hover {
    background: var(--bg-hover);
}

.playlist-item.active {
    background: var(--primary);
}

.playlist-item.completed {
    opacity: 0.7;
}

.playlist-number {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.playlist-item.active .playlist-number {
    background: rgba(255, 255, 255, 0.2);
}

.playlist-info {
    flex: 1;
}

.playlist-info h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.playlist-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.playlist-item.active .playlist-info span {
    color: rgba(255, 255, 255, 0.7);
}

.playlist-status {
    font-size: 0.875rem;
}

/* Daily Records Section */
.records-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.records-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.record-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.record-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.record-info {
    display: flex;
    flex-direction: column;
}

.record-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.record-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.records-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.calendar-card .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-card .calendar-header span {
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: var(--bg-hover);
}

.calendar-day.level-0 {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.calendar-day.level-1 {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

.calendar-day.level-2 {
    background: rgba(99, 102, 241, 0.5);
    color: var(--text-primary);
}

.calendar-day.level-3 {
    background: rgba(99, 102, 241, 0.8);
    color: white;
}

.calendar-day.today {
    border: 2px solid var(--primary);
}

.calendar-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.activity-breakdown .breakdown-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    padding-top: 20px;
}

.chart-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-bar {
    width: 40px;
    background: linear-gradient(to top, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    min-height: 20px;
}

.chart-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.recent-sessions .session-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.session-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.session-icon.python {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.session-icon.javascript {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.session-icon.java {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.session-details {
    flex: 1;
}

.session-details h4 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.session-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.session-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* AI Assistant Section */
.ai-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    height: calc(100vh - 200px);
}

.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: var(--primary);
}

.user-message .message-avatar {
    background: var(--secondary);
}

.message-content {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.6;
}

.user-message .message-content {
    background: var(--primary);
    color: white;
}

.message-content p {
    margin-bottom: 12px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content pre {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 12px 0;
    overflow-x: auto;
}

.message-content code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.chat-input-container {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
}

.chat-input-wrapper textarea {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    resize: none;
    min-height: 24px;
    max-height: 120px;
}

.chat-input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.ai-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quick-prompts .prompt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-btn {
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.prompt-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.code-templates .template-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.template-item:hover {
    background: var(--bg-hover);
}

.template-lang {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.template-lang.python {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.template-lang.javascript {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.template-lang.java {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.template-lang.csharp {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.template-name {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.chat-history .history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: var(--bg-hover);
}

.history-title {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* AI Floating Button */
.ai-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    z-index: 90;
}

.ai-float-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-container {
        grid-template-columns: 1fr;
    }
    
    .ai-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .ai-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-search {
        display: none;
    }
    
    .revision-container {
        grid-template-columns: 1fr;
    }
    
    .revision-sidebar {
        position: static;
    }
    
    .records-grid {
        grid-template-columns: 1fr;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
}

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

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

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

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

/* Syntax Highlighting Override */
.hljs {
    background: transparent !important;
    padding: 0 !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    animation: fadeIn 0.3s ease;
}

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