/* ============================================
   Educational Platform UX Enhancements
   Clean, Intuitive, Student-Friendly Design
   ============================================ */

/* Learning Path Progress Bar - Glassmorphism Design */
.learning-progress-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

/* Light theme overrides (index uses data-theme="default") */
[data-theme="default"] .learning-progress-container {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-theme="default"] .learning-progress-container::before {
    opacity: 0.25;
}

[data-theme="default"] .learning-progress-container::after {
    opacity: 0.18;
}

[data-theme="default"] .learning-progress-title {
    color: rgba(15, 23, 42, 0.95);
    text-shadow: none;
}

[data-theme="default"] .learning-progress-percentage {
    color: rgba(15, 23, 42, 0.95);
    text-shadow: none;
}

[data-theme="default"] .learning-progress-percentage::after {
    color: inherit;
}

[data-theme="default"] .learning-progress-bar {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.04),
                0 1px 0 rgba(255,255,255,0.65);
}

[data-theme="default"] .learning-progress-count-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

[data-theme="default"] .learning-progress-count-label {
    color: rgba(15, 23, 42, 0.78);
    text-shadow: none;
}

[data-theme="default"] .learning-progress-count-card:hover {
    background: rgba(255, 255, 255, 0.95);
}

.learning-progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(236, 72, 153, 0.1) 50%,
        rgba(139, 92, 246, 0.1) 100%);
    opacity: 0.5;
    z-index: -1;
}

.learning-progress-container::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation: none;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.learning-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.learning-progress-title {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.learning-progress-title i {
    color: #fbbf24;
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.4));
}

.learning-progress-percentage {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(139, 92, 246, 0.5),
                 0 0 20px rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.learning-progress-percentage::after {
    content: '%';
    font-size: 1rem;
    margin-left: 4px;
}

.learning-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2),
                0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.learning-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        #fbbf24 0%, 
        #f59e0b 50%,
        #fbbf24 100%);
    background-size: 200% 100%;
    border-radius: 999px;
    transition: none;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.learning-progress-fill::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: none;
}

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

/* Progress Count Cards - Glassmorphism */
.learning-progress-count-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: none;
}

.learning-progress-count-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
    box-shadow: none;
}

.learning-progress-count-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    margin-bottom: 4px;
    line-height: 1;
}

.learning-progress-count-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.compact-progress-card .learning-progress-container,
.compact-progress-card {
    max-width: 420px;
}

/* Quick Access Cards */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.quick-access-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.quick-access-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6;
}

.quick-access-card i {
    font-size: 2.5rem;
    color: #8b5cf6;
    margin-bottom: 12px;
    display: block;
}

.quick-access-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.quick-access-card p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

/* Course Card Enhancements */
.course-card-modern {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.course-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.course-card-modern:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.course-card-modern:hover::before {
    transform: scaleX(1);
}

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

.course-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    flex: 1;
}

.course-card-badge {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 12px;
}

.course-card-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.course-card-stats {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.course-card-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
}

.course-card-stat i {
    color: #8b5cf6;
    font-size: 1rem;
}

/* Section Headers */
.section-header-modern {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.section-title-modern {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-modern i {
    color: #8b5cf6;
    font-size: 1.5rem;
}

.section-subtitle-modern {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Content Grid Improvements */
.content-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .content-grid-modern {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Content Item Card */
.content-item-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.content-item-modern:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    border-color: #8b5cf6;
}

.content-item-thumbnail {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.content-item-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.3;
}

.content-item-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.content-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
}

.content-item-meta i {
    color: #8b5cf6;
}

/* Empty State */
.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.empty-state-modern i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: block;
}

.empty-state-modern h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.empty-state-modern p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Study Dashboard */
.study-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.study-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.study-dashboard-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.study-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.study-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.study-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #8b5cf6;
    margin-bottom: 4px;
}

.study-stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

/* Navigation Improvements */
.sidebar-nav-modern ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-modern li {
    margin-bottom: 4px;
}

.sidebar-nav-modern a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-nav-modern a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(4px);
}

.sidebar-nav-modern a.active {
    background: rgba(139, 92, 246, 0.2);
    color: white;
    border-left: 3px solid #8b5cf6;
}

.sidebar-nav-modern a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .learning-progress-container,
    .study-dashboard {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .content-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .section-title-modern {
        font-size: 1.5rem;
    }
}

/* Focus States for Accessibility */
.quick-access-card:focus,
.content-item-modern:focus,
.course-card-modern:focus {
    outline: 3px solid #8b5cf6;
    outline-offset: 2px;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
