:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-dark: #4338ca;
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #0cebeb 0%, #20e3b2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --muted-border-color: #e2e8f0;
    --bg-light: #f8fafc;
}

body {
    padding-bottom: 2rem;
    color: var(--text-primary);
    background: #ffffff;
    line-height: 1.6;
    font-size: 0.95rem;
}

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

.resource-card {
    border: 1px solid var(--muted-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: var(--card-background-color);
}

.resource-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.resource-card.enrolled {
    border-left: 4px solid var(--primary);
}

.resource-card.completed {
    border-left: 4px solid var(--success);
    opacity: 0.8;
}

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

.resource-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--primary);
    color: white;
    text-transform: uppercase;
    font-weight: 600;
}

.resource-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.resource-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: var(--primary);
}

.resource-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.resource-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--muted-border-color);
}

.resource-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

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

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--muted-border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    transition: width 0.3s ease;
    border-radius: 4px;
}

.meta-info {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.objectives-list {
    margin: 1rem 0;
}

.objectives-list h4 {
    margin-bottom: 0.5rem;
}

.objectives-list ul {
    list-style: none;
    padding: 0;
}

.objectives-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.objectives-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

#progress-stats {
    margin-bottom: 2rem;
}

#progress-stats article {
    text-align: center;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: none;
    transition: all 0.3s ease;
}

#progress-stats article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

#progress-stats h2 {
    margin: 0;
    color: var(--primary);
}

.progress-item {
    border: 1px solid var(--muted-border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.progress-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.progress-item h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.empty-state::before {
    content: '📚';
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

#search-section {
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

#search-section input,
#search-section select {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

#search-section input:focus,
#search-section select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

dialog article {
    max-width: 600px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

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

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Section titles */
h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

/* Buttons */
button {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
}

/* Main container spacing */
main.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Dashboard Layout - Modern & Responsive */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Welcome Header */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1rem;
}

.dashboard-header h2 {
    color: white !important;
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    -webkit-text-fill-color: white;
}

.dashboard-header .dashboard-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

/* Stats Grid - Horizontal Cards */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Progress & Achievements Row */
.dashboard-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1rem;
}

.insight-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
}

.insight-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.insight-card h3 {
    font-size: 1.3rem;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

.phase-progress-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.phase-item {
    margin: 0;
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.phase-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    transition: width 0.5s ease;
    border-radius: 5px;
}

/* Achievements Grid */
.achievements-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
}

.achievement-item {
    text-align: center;
    font-size: 2.5rem;
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: pointer;
}

.achievement-item.unlocked {
    opacity: 1;
    animation: unlockPop 0.5s ease;
}

.achievement-item:hover {
    transform: scale(1.15);
}

@keyframes unlockPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.empty-achievements {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
}

/* Learning Content */
.continue-section,
.recommended-section {
    margin-bottom: 2rem;
}

.continue-section h2,
.recommended-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-insights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-header .dashboard-subtitle {
        font-size: 1rem !important;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .insight-card {
        padding: 1.5rem;
    }
    
    .insight-card h3 {
        font-size: 1.15rem !important;
    }
    
    .achievements-preview {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.75rem;
    }
    
    .achievement-item {
        font-size: 2rem;
    }
    
    .module-grid {
        grid-template-columns: 1fr;
    }
    
    .continue-section h2,
    .recommended-section h2 {
        font-size: 1.4rem !important;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 1.5rem 1rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.25rem;
    }
    
    .stat-card {
        padding: 1rem;
        gap: 1rem;
    }
    
    .achievements-preview {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .phase-header {
        font-size: 0.85rem;
    }
    
    .phase-count {
        font-size: 0.75rem;
    }
}

/* ========== NEW STYLES FOR MVP ========== */

/* Onboarding */
.onboarding-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.onboarding-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

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

.form-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.role-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.role-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.role-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.role-card h4 {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.role-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-group label:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.75rem;
}

.primary-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
/* Dashboard - legacy styles cleaned up, see dashboard section above */

/* Removed duplicate styles - achievements now defined in dashboard section above */

/* Module Grid */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.module-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

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

.module-card.in-progress {
    border-left: 4px solid var(--primary);
}

.module-card.completed {
    border-left: 4px solid var(--success);
    opacity: 0.95;
}

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

.module-phase {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.module-status {
    font-size: 1.5rem;
}

.module-card h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    color: var(--primary);
}

.module-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

/* Filter Section */
.filter-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

/* Lesson View */
.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: white;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: var(--primary);
    color: white;
}

.lesson-meta {
    display: flex;
    gap: 1rem;
}

.lesson-phase,
.lesson-duration,
.lesson-level {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
}

.lesson-summary {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.lesson-objectives {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.lesson-objectives h3 {
    color: var(--text-primary) !important;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.objectives-list {
    list-style: none;
    padding: 0;
}

.objectives-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-primary) !important;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.8;
}

.objectives-list li:before {
    content: '✓';
    position: absolute;
    left: 0.5rem;
    color: var(--success);
    font-weight: bold;
}

/* Learning Tabs */
.learning-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.tab-btn:hover {
    color: var(--primary);
}

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

.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.tab-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

/* Tab Content Styles */
.facts-container {
    display: grid;
    gap: 1rem;
}

.fact-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.source-link {
    margin-top: 0.5rem;
}

.source-link a {
    color: var(--primary);
    text-decoration: underline;
}

.lesson-steps ol {
    line-height: 1.8;
}

.artifacts {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.concept-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #8b5cf6;
}

.concept-card h4 {
    margin-top: 0;
    color: #8b5cf6;
}

.standards ul {
    margin-top: 0.5rem;
}

.application-card {
    background: white;
    padding: 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.use-case {
    background: #fef3c7;
    padding: 1rem;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.app-steps {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.tooling,
.qa-checks,
.data-points {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Quiz Styles */
.quiz-container {
    margin-bottom: 2rem;
}

.quiz-question {
    background: white;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.quiz-options {
    margin-top: 1rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.quiz-option input[type="radio"] {
    margin-right: 0.75rem;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}

.quiz-feedback.correct {
    background: #d1fae5;
    color: #065f46;
}

.quiz-feedback.incorrect {
    background: #fee2e2;
    color: #991b1b;
}

.quiz-feedback.warning {
    background: #fef3c7;
    color: #92400e;
}

/* Actions */
.lesson-actions {
    margin: 2rem 0;
    text-align: center;
}

.complete-button {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.complete-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* Nav Badges */
.level-badge,
.xp-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.level-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.xp-badge {
    background: #fef3c7;
    color: #92400e;
}

/* Empty States */
.empty-state,
.empty-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .role-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-section {
        grid-template-columns: 1fr;
    }
    
    .module-grid {
        grid-template-columns: 1fr;
    }
    
    .learning-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Enhanced Readability & Content Styles */
.module-intro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary);
}

.module-intro h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.fact-card {
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.fact-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.fact-content {
    flex: 1;
}

.fact-content p {
    font-weight: 500;
}

.source-link {
    font-size: 0.9rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.source-link strong {
    color: var(--text-primary);
}

.source-link a {
    color: var(--primary);
    font-weight: 600;
}

.lesson-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid #f1f5f9;
}

.lesson-section:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.assessment-items {
    background: #fef3c7;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 500;
}


.module-summary {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

.module-card h3 {
    color: var(--text-primary);
    font-weight: 700;
}

.lesson-summary {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.8;
}

.use-case {
    background: #fef3c7;
    padding: 1.5rem;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.concept-card p {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
}

.application-card h3 {
    color: var(--text-primary);
}

.app-steps li {
    color: var(--text-primary);
    font-weight: 500;
}

.quiz-question p {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.7;
}

.quiz-option span {
    color: var(--text-primary);
    font-size: 1rem;
}

/* Better contrast for all text */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

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

strong {
    color: var(--text-primary);
    font-weight: 700;
}

.role-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.achievement-card p {
    color: var(--text-secondary);
}

.empty-state,
.empty-message {
    color: var(--text-secondary);
}

.progress-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.lesson-phase,
.lesson-duration,
.lesson-level {
    color: var(--text-primary);
    font-weight: 600;
}

/* Improve tab readability */
.tab-section {
    line-height: 1.8;
}

.tab-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tab-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tab-section p {
    font-size: 1rem;
    line-height: 1.8;
}

.tab-section li {
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Tooltip System */
.tooltip-trigger {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--primary);
}

.tooltip-trigger:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1rem;
    background: var(--text-primary);
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
    width: 280px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    text-align: left;
}

.tooltip-trigger:hover::before {
    content: '';
    position: absolute;
    bottom: 118%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
    z-index: 1001;
}

/* Fix all remaining gray text issues */
.module-card h3,
.lesson-section h4,
.concept-card h4,
.application-card h3,
.tab-section h3,
.tab-section h4,
.tab-section h5 {
    color: var(--text-primary) !important;
}

.module-summary,
.lesson-summary,
.concept-card p,
.application-card p,
.tab-section p,
.tab-section li,
.fact-content p,
.use-case p {
    color: var(--text-primary) !important;
}

/* Strong contrast for all interactive elements */
.quiz-question p,
.quiz-option span,
.lesson-steps li,
.app-steps li {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

/* Make sure all descriptive text is dark */
small, 
.source-link,
.meta-item,
.module-meta,
.stat-label,
.progress-text,
.dashboard-subtitle,
.subtitle {
    color: var(--text-primary) !important;
    opacity: 0.85;
}

/* Ensure readability in all contexts */
.empty-state,
.empty-message {
    color: var(--text-primary) !important;
    opacity: 0.7;
}

/* Bold text should always be dark */
strong, b {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

/* Links should be clearly visible */
a {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

a:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}
