/* Learning Hub Custom Styles */

/* Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-learning: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #ffffff;
    --bs-card-bg: #2d2d2d;
    --bs-border-color: #404040;
    --light-color: #2d2d2d;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    transition: var(--transition-smooth);
}

html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(15px);
    background-color: rgba(13, 110, 253, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

#theme-toggle {
    border-radius: 50px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

#theme-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-learning);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="learning-grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23learning-grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.gradient-text {
    background: linear-gradient(45deg, #fff, #f8f9fa, #e9ecef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.learning-stats {
    margin-top: 2rem;
}

.stat-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

/* Floating Icons Animation */
.floating-icons-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.floating-icon {
    position: absolute;
    font-size: 3rem;
    opacity: 0.7;
    animation: floatAround 20s infinite linear;
    transition: var(--transition-smooth);
}

.floating-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

@keyframes floatAround {
    0% { transform: rotate(0deg) translateX(150px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

/* Specific icon positioning and colors */
.java-icon {
    color: #f89820;
    animation-delay: 0s;
    animation-duration: 25s;
}

.python-icon {
    color: #3776ab;
    animation-delay: -4s;
    animation-duration: 22s;
}

.js-icon {
    color: #f7df1e;
    animation-delay: -8s;
    animation-duration: 28s;
}

.react-icon {
    color: #61dafb;
    animation-delay: -12s;
    animation-duration: 20s;
}

.db-icon {
    color: #336791;
    animation-delay: -16s;
    animation-duration: 24s;
}

.algo-icon {
    color: #28a745;
    animation-delay: -20s;
    animation-duration: 26s;
}

/* Module Cards */
.module-card {
    transition: var(--transition-smooth);
    border: none;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.module-header {
    position: relative;
    padding: 2rem 1.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    color: white;
    text-align: center;
}

.module-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.module-body {
    padding: 1.5rem;
}

.topic-count {
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.progress-ring {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
}

.progress-ring circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 4;
}

.progress-ring .progress {
    stroke: #ffffff;
    stroke-width: 4;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s ease-in-out;
}

/* Topic Lists */
.topic-list {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
}

.topic-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    transition: var(--transition-smooth);
    border-left: 3px solid var(--primary-color);
}

.topic-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.topic-item i {
    margin-right: 0.5rem;
    width: 16px;
}

/* Search and Quick Access */
.search-highlight {
    background: yellow;
    padding: 2px 4px;
    border-radius: 3px;
}

#search-input {
    border-radius: 25px;
}

.quick-access-card {
    transition: var(--transition-smooth);
    border-radius: 15px;
}

.quick-access-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Progress Visualization */
#progress-chart {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.progress-bar-container {
    width: 100%;
    margin-bottom: 1rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress {
    height: 12px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    transition: width 2s ease-in-out;
    border-radius: 10px;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem 2rem;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Code Blocks */
pre[class*="language-"] {
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
        min-height: 80vh;
    }
    
    .floating-icons-container {
        width: 250px;
        height: 250px;
    }
    
    .floating-icon {
        font-size: 2rem;
    }
    
    @keyframes floatAround {
        0% { transform: rotate(0deg) translateX(80px) rotate(0deg); }
        100% { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
    }
    
    .learning-stats {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .module-card {
        margin-bottom: 2rem;
    }
}

/* Dark Theme Overrides */
[data-theme="dark"] .module-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    color: white;
}

[data-theme="dark"] .topic-list {
    background: #404040;
}

[data-theme="dark"] .topic-item {
    background: #2d2d2d;
    color: #ffffff;
}

[data-theme="dark"] .topic-item:hover {
    background: var(--primary-color);
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Bookmark System */
.bookmark-btn {
    position: absolute;
    top: 10px;
    right: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.bookmark-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.bookmark-btn.bookmarked {
    background: #ffc107;
    color: #212529;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0b5ed7, #0aa2c0);
}

/* Learning Wizard & Session Styles */
.path-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
}

.path-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.path-card.border-primary {
    border-color: var(--primary-color) !important;
    background: linear-gradient(145deg, rgba(13, 110, 253, 0.05), rgba(13, 110, 253, 0.02));
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--success-color));
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-marker i {
    font-size: 0.7rem;
}

.timeline-content h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.learning-session-content .progress {
    border-radius: 10px;
    background: rgba(13, 110, 253, 0.1);
}

.learning-session-content .progress-bar {
    border-radius: 10px;
    background: linear-gradient(45deg, var(--primary-color), var(--success-color));
}

.topic-content .card {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.learning-session-content .alert {
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, rgba(13, 202, 240, 0.1), rgba(13, 110, 253, 0.1));
    border-left: 4px solid var(--info-color);
}

/* Wizard step animations */
.wizard-step {
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal enhancements */
.modal-xl .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header.bg-primary,
.modal-header.bg-success {
    border-radius: 15px 15px 0 0;
}

/* Form styling */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    line-height: 1.4;
}

/* Progress tracking enhancements */
.session-progress {
    background: linear-gradient(90deg, var(--success-color) 0%, var(--primary-color) 100%);
    border-radius: 10px;
    height: 8px;
}

/* Dark theme learning enhancements */
[data-theme="dark"] .timeline::before {
    background: linear-gradient(to bottom, #4f46e5, #059669);
}

[data-theme="dark"] .timeline-marker {
    background: #2d2d2d;
    border: 2px solid #404040;
}

[data-theme="dark"] .path-card {
    background: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .path-card.border-primary {
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.05));
}