/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-light: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

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

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.user-profile {
    font-size: 1.5rem;
    cursor: pointer;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 4rem 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.code-window {
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.window-header {
    background: #334155;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    border-bottom: 1px solid #475569;
}

.window-code {
    padding: 2rem;
    font-family: 'Courier New', monospace;
    color: #10b981;
    font-size: 1rem;
    line-height: 1.8;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: 4rem 20px;
    background: var(--light-bg);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
}

/* ===== CTA SECTION ===== */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 20px;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ===== SCHEDULE PAGE ===== */
.schedule-section {
    padding: 3rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.schedule-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.filter-controls {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.view-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.toggle-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== CALENDAR ===== */
.calendar-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

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

.calendar-header button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

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

.day-header {
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    color: var(--primary-color);
}

/* ===== SESSION LIST ===== */
.sessions-list {
    display: grid;
    gap: 1.5rem;
}

.session-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: var(--transition);
}

.session-item:hover {
    box-shadow: var(--shadow-lg);
}

.session-time {
    text-align: center;
    min-width: 80px;
}

.session-time .time {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.session-time .date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.session-info {
    flex: 1;
}

.session-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.session-info p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-beginner {
    background: #d1fae5;
    color: #065f46;
}

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

.badge-advanced {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s;
}

.modal-large {
    max-width: 800px;
    margin: 5% auto;
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-dark);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== DASHBOARD ===== */
.dashboard-section {
    padding: 3rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.user-greeting h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.card-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.view-all:hover {
    text-decoration: underline;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    display: grid;
    gap: 1.5rem;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

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

/* ===== UPCOMING SESSIONS ===== */
.upcoming-sessions {
    display: grid;
    gap: 1rem;
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
}

.achievement-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.achievement-badge:hover:not(.locked) {
    transform: scale(1.05);
}

.achievement-badge i {
    font-size: 2rem;
}

.achievement-badge p {
    font-size: 0.75rem;
    font-weight: 600;
}

.achievement-badge.locked {
    background: #cbd5e1;
    color: var(--text-light);
    opacity: 0.6;
}

/* ===== COURSES LIST ===== */
.courses-list {
    display: grid;
    gap: 1rem;
}

.course-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    align-items: center;
}

.course-icon {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 50px;
}

.course-details {
    flex: 1;
}

.course-details h4 {
    margin-bottom: 0.25rem;
}

.course-details p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.mini-progress {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.mini-fill {
    height: 100%;
    background: var(--primary-color);
}

/* ===== LEADERBOARD ===== */
.leaderboard {
    display: grid;
    gap: 0.75rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.leaderboard-item.you {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.rank {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.leaderboard-item.you .rank {
    color: white;
}

.user-info h4 {
    margin-bottom: 0.25rem;
}

.user-info p {
    font-size: 0.875rem;
    color: var(--text-light);
}

.leaderboard-item.you p {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== RESOURCES PAGE ===== */
.resources-section {
    padding: 3rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.resource-search {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.resource-search input {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.resource-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== TOPIC TABS ===== */
.topic-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.topic-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.topic-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== RESOURCES GRID ===== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.resource-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.resource-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
}

.resource-type {
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.resource-card h3 {
    padding: 0 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.resource-card p {
    padding: 0 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    flex: 1;
}

.resource-meta {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

.resource-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== LEARNING PATH ===== */
.learning-path {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.learning-path h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.path-timeline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.path-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
    position: relative;
}

.path-item.completed {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.path-item.in-progress {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
}

.path-marker {
    width: 30px;
    height: 30px;
    background: var(--border-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.path-item.completed .path-marker {
    background: var(--success-color);
    color: white;
}

.path-item.in-progress .path-marker {
    background: var(--warning-color);
    color: white;
}

.path-item h4 {
    margin-bottom: 0.5rem;
}

.path-item p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 20px;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #475569;
    padding-top: 1rem;
    color: #cbd5e1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 2rem 20px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .welcome-header {
        grid-template-columns: 1fr;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

    .path-timeline {
        flex-direction: column;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .filter-tags {
        flex-direction: column;
    }

    .filter-tag {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .features h2 {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .session-item {
        flex-direction: column;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 30% auto;
        width: 95%;
    }
}