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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    color: white;
    padding: 0;
    height: 60px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.25rem;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.header-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 100%;
}

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

.logo i {
    font-size: 1.75rem;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

#progress-text {
    font-size: 0.85rem;
    white-space: nowrap;
}

.progress-bar {
    width: 120px;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #22c55e);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    min-width: 0%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
    position: relative;
}

/* Enhanced Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.9);
    color: #374151;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16,185,129,0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: inherit;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.btn-sm i {
    font-size: 1rem;
}

/* Enhanced Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 280px;
    height: calc(100vh - 60px);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.08);
    z-index: 999;
    transform: translateX(0); /* Default open on desktop */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

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

/* When sidebar is closed on desktop */
.sidebar:not(.open) {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header i {
    color: #3b82f6;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.close-sidebar:hover {
    background: rgba(0,0,0,0.05);
    color: #374151;
}

/* Enhanced Search */
.search-box {
    padding: 1.5rem;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1), 0 4px 12px rgba(0,0,0,0.08);
}

.search-box i {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
}

/* Enhanced Module List */
.module-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem 2rem;
}

.module-section {
    margin-bottom: 2rem;
}

.module-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.module-section h4 i {
    font-size: 1rem;
}

.module-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-item {
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.module-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: all 0.3s;
}

.module-item:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.module-item:hover::before {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}

.module-item.active {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
    transform: translateX(4px);
}

.module-item.active::before {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.module-item.completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #10b981;
}

.module-item.completed::before {
    background: linear-gradient(180deg, #10b981, #059669);
}

.module-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.module-status i {
    font-size: 1.1rem;
    transition: all 0.3s;
}

/* Remove old mobile menu button styles */

/* Enhanced Main Content */
.main-content {
    margin-top: 60px;
    margin-left: 0;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 0;
}

.main-content {
    margin-left: 280px; /* Default margin for open sidebar */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.sidebar-closed {
    margin-left: 0;
}

/* Enhanced Welcome Screen */
.welcome-screen {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
}

.welcome-content {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.welcome-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(59,130,246,0.2);
}

.welcome-icon i {
    font-size: 3.5rem;
    color: white;
}

.welcome-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1f2937, #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-description {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.training-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.overview-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.overview-card:hover {
    transform: translateY(-4px);
}

.overview-card i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.overview-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.overview-card p {
    color: #6b7280;
    font-size: 0.95rem;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced Module Content */
.module-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.module-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.module-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.module-number {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.module-category {
    background: rgba(139,92,246,0.1);
    color: #8b5cf6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(139,92,246,0.2);
}

.module-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.2;
}

.module-actions {
    display: flex;
    gap: 0.75rem;
}

.content-wrapper {
    padding: 3rem;
}

.module-body {
    line-height: 1.8;
    color: #374151;
}

/* Enhanced Typography */
.module-body h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 2rem 0 1rem;
    line-height: 1.2;
}

.module-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.module-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 1.25rem 0 0.75rem;
}

.module-body p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.module-body ul, .module-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.module-body li {
    margin-bottom: 0.5rem;
}

.module-body blockquote {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #1e40af;
}

.module-body code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #ef4444;
}

.module-body pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.module-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    border-radius: 0;
}

.module-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.module-body th, .module-body td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.module-body th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 600;
    color: #374151;
}

.module-body tr:hover {
    background: #f8fafc;
}

/* Enhanced Module Footer */
.module-footer {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.module-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.module-completion {
    display: flex;
    gap: 1rem;
}

/* Enhanced Progress Screen */
.progress-screen {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.progress-content {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.progress-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-modules h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-module-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-module-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.progress-module-item.completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #10b981;
}

.progress-module-item i {
    font-size: 1.5rem;
    color: #d1d5db;
}

.progress-module-item.completed i {
    color: #10b981;
}

.progress-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .header-controls {
        gap: 0.5rem;
    }
    
    .progress-summary {
        padding: 0.5rem;
    }
    
    #progress-text {
        font-size: 0.75rem;
    }
    
    .progress-bar {
        width: 80px;
        height: 6px;
    }
    
    .btn-sm {
        padding: 0.5rem;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
    }
    
    .sidebar {
        width: 260px;
        transform: translateX(-100%); /* Hidden by default on mobile */
    }
    
    .main-content {
        margin-left: 0 !important; /* No margin on mobile */
    }
    
    .welcome-screen, .progress-screen {
        padding: 1rem;
    }
    
    .welcome-content, .progress-content {
        padding: 2rem;
    }
    
    .welcome-content h2 {
        font-size: 2rem;
    }
    
    .welcome-description {
        font-size: 1.1rem;
    }
    
    .training-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .module-content {
        margin: 0;
        border-radius: 16px;
    }
    
    .module-header {
        padding: 2rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .module-header h2 {
        font-size: 1.5rem;
    }
    
    .content-wrapper {
        padding: 2rem;
    }
    
    .module-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-actions, .welcome-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }
}

/* Dark scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Custom focus styles */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus, .btn:focus {
    outline-offset: 4px;
}

/* Dark Theme */
.dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

.dark-theme .header {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #db2777 100%);
}

.dark-theme .sidebar-toggle {
    background: rgba(255,255,255,0.1);
}

.dark-theme .sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.dark-theme .sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-right-color: rgba(255,255,255,0.1);
}

.dark-theme .sidebar-header {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-bottom-color: rgba(255,255,255,0.1);
}

.dark-theme .sidebar-header h3 {
    color: #e2e8f0;
}

.dark-theme .search-box input {
    background: #374151;
    border-color: #4b5563;
    color: #e2e8f0;
}

.dark-theme .search-box input:focus {
    border-color: #3b82f6;
    background: #4b5563;
}

.dark-theme .module-item {
    background: #374151;
    border-color: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.dark-theme .module-item:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.dark-theme .module-item.active {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
}

.dark-theme .module-item.completed {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

.dark-theme .welcome-content,
.dark-theme .progress-content,
.dark-theme .module-content {
    background: #1e293b;
    border-color: rgba(255,255,255,0.1);
}

.dark-theme .overview-card,
.dark-theme .stat-card {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-color: rgba(255,255,255,0.1);
}

.dark-theme .overview-card h3,
.dark-theme .welcome-content h2,
.dark-theme .progress-content h2,
.dark-theme .module-header h2 {
    color: #e2e8f0;
}

.dark-theme .module-header {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-bottom-color: rgba(255,255,255,0.1);
}

.dark-theme .module-footer {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-top-color: rgba(255,255,255,0.1);
}

.dark-theme .module-body {
    color: #d1d5db;
}

.dark-theme .module-body h1,
.dark-theme .module-body h2,
.dark-theme .module-body h3 {
    color: #e2e8f0;
}

.dark-theme .module-body h2 {
    border-bottom-color: #4b5563;
}

.dark-theme .module-body blockquote {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #dbeafe;
}

.dark-theme .module-body code {
    background: #374151;
    color: #fbbf24;
}

.dark-theme .module-body pre {
    background: #0f172a;
    color: #e2e8f0;
}

.dark-theme .module-body table th {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #e2e8f0;
}

.dark-theme .module-body table td {
    border-bottom-color: #4b5563;
}

.dark-theme .module-body tr:hover {
    background: #374151;
}

.dark-theme .progress-module-item {
    background: #374151;
    border-color: rgba(255,255,255,0.1);
}

.dark-theme .progress-module-item.completed {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

/* Notification System */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-success i {
    color: #10b981;
    font-size: 1.25rem;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-info i {
    color: #3b82f6;
    font-size: 1.25rem;
}

.dark-theme .notification {
    background: #374151;
    border-color: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

/* Enhanced Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* Enhanced Module Transitions */
.module-body {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.dark-theme .loading::after {
    border-color: #4b5563;
    border-top-color: #60a5fa;
}

/* Enhanced Focus States */
.module-item:focus,
.btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.dark-theme .module-item:focus,
.dark-theme .btn:focus {
    outline-color: #60a5fa;
}

/* Print styles */
@media print {
    .sidebar, .sidebar-toggle, .overlay, .module-footer, .notification, .theme-toggle, .header {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .module-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Mobile Improvements */
@media (max-width: 768px) {
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .theme-toggle {
        order: -1;
    }
}

/* Desktop - sidebar push content */
@media (min-width: 1025px) {
    .main-content.sidebar-closed {
        margin-left: 0;
    }
    
    .sidebar.open ~ .overlay {
        display: none !important;
    }
}

/* Tablet and below - sidebar overlay */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0 !important;
    }
}