:root {
    --bg-dark: #0f172a;
    --primary: #6366f1;
    /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #ec4899;
    /* Pink */
    --accent: #06b6d4;
    /* Cyan */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    z-index: -1;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: drift 20s infinite alternate;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -100px;
    right: -100px;
    animation: drift 15s infinite alternate-reverse;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Header */
.glass-nav {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 30px;
}

.back-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.badge-lang {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-lang.javascript {
    background: rgba(247, 223, 30, 0.2);
    color: #f7df1e;
    border: 1px solid rgba(247, 223, 30, 0.4);
}

.badge-lang.python {
    background: rgba(55, 118, 171, 0.2);
    color: #3776ab;
    border: 1px solid rgba(55, 118, 171, 0.4);
}

.badge-lang.html {
    background: rgba(227, 79, 38, 0.2);
    color: #e34f26;
    border: 1px solid rgba(227, 79, 38, 0.4);
}

.badge-lang.css {
    background: rgba(21, 114, 182, 0.2);
    color: #1572b6;
    border: 1px solid rgba(21, 114, 182, 0.4);
}


.xp-pill {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

/* Progress Card - Enhanced */
.progress-floating-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    animation: slideInDown 0.6s ease-out;
}

.progress-floating-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    opacity: 0.6;
}

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

.custom-progress {
    height: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    box-shadow: 0 0 20px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    border-radius: 10px;
}

.progress-bar::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: shimmer 2s infinite;
}

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

/* Timeline */
.timeline-container {
    position: relative;
    padding: 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.timeline {
    position: relative;
}

/* The Vertical Line - Enhanced */
.timeline-track {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
    border-radius: 2px;
    overflow: hidden;
}

.timeline-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, var(--primary), var(--accent), var(--success));
    border-radius: 2px;
    transition: height 2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-item.completed ~ .timeline-item.completed .timeline-track::after,
.timeline-item.completed .timeline-track::after {
    height: 100%;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }
.timeline-item:nth-child(10) { animation-delay: 1s; }

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

/* Left vs Right logic for Tablets+ */
@media (min-width: 768px) {
    .timeline-item {
        justify-content: space-between;
    }

    .timeline-item:nth-child(odd) {
        flex-direction: row-reverse;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
        padding-right: 50px;
    }

    .timeline-item:nth-child(even) .timeline-content {
        text-align: right;
        padding-left: 50px;
    }

    /* Make content width 50% minus gap */
    .timeline-content {
        width: 45%;
    }
}

@media (max-width: 767px) {
    .timeline-track {
        left: 30px;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-left: 70px;
    }

    .timeline-marker {
        left: 30px !important;
        transform: translateX(-50%) !important;
    }

    .timeline-content {
        width: 100%;
        text-align: left;
    }
}


/* Markers */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-marker .marker-icon {
    color: var(--text-muted);
}

.timeline-item.completed .timeline-marker {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.timeline-item.completed .marker-icon {
    color: var(--success);
}

.timeline-item.unlocked.current .timeline-marker {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.timeline-item.unlocked.current .marker-icon {
    color: white;
}

.marker-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Enhanced Status Indicator */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.timeline-item.completed .status-indicator {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: statusPulse 2s infinite;
}

.timeline-item.unlocked.current .status-indicator {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Card Content - Enhanced */
.card-glass {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

.timeline-item:hover .card-glass::before {
    left: 100%;
}

.timeline-item:hover .card-glass {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.timeline-item.completed .card-glass {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(30, 41, 59, 0.8));
}

.timeline-item.completed:hover .card-glass {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.2);
}

.mission-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 8px 0;
    color: white;
}

/* Buttons - Enhanced */
.btn-play {
    display: block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 20px var(--primary-glow), 0 0 0 0 rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-play::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-play:hover::before {
    width: 300px;
    height: 300px;
}

.btn-play:hover {
    transform: translateY(-2px) scale(1.02);
    color: white;
    box-shadow: 0 8px 30px var(--primary-glow), 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.btn-play:active {
    transform: translateY(0) scale(0.98);
}

.btn-locked {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 12px;
    padding: 10px;
}

/* Trophy */
.marker-trophy {
    width: 70px;
    height: 70px;
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--warning);
    color: var(--warning);
}

.marker-trophy .material-symbols-rounded {
    font-size: 32px;
}

/* Enhanced Card Text */
.card-text {
    line-height: 1.6;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 12px 0;
}

/* Roadmap Wrapper */
.roadmap-wrapper {
    padding: 2rem 0 4rem;
    min-height: calc(100vh - 80px);
    animation: fadeIn 0.6s ease-out;
}

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

/* Enhanced Header */
.glass-nav {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.path-identity h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced locked button */
.btn-locked {
    position: relative;
    overflow: hidden;
}

.btn-locked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-locked:hover::before {
    width: 200px;
    height: 200px;
}