:root {
    --bg-dark: #0a0c10;
    --bg-card: rgba(25, 28, 35, 0.7);
    --accent-foundation: #00e676;
    --accent-intelligence: #00b0ff;
    --accent-mastery: #d500f9;
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow-foundation: rgba(0, 230, 118, 0.3);
    --glow-intelligence: rgba(0, 176, 255, 0.3);
    --glow-mastery: rgba(213, 0, 249, 0.3);
}

/* Base / Mobile First */
body.roadmap-mode {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.roadmap-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 60px 16px;
    position: relative;
    box-sizing: border-box;
}

/* Central path line - Mobile Position (Left-ish) */
.roadmap-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 40px;
    /* Aligned with nodes on mobile */
    width: 3px;
    background: linear-gradient(to bottom,
            transparent 0%,
            var(--accent-foundation) 10%,
            var(--accent-intelligence) 40%,
            var(--accent-mastery) 80%,
            transparent 100%);
    z-index: 1;
    opacity: 0.15;
}

.roadmap-zone {
    position: relative;
    z-index: 2;
    margin-bottom: 80px;
}

.zone-header {
    text-align: left;
    margin-bottom: 40px;
    padding-left: 60px;
    /* Offset from the line */
}

.zone-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.zone-foundation .zone-badge {
    background: var(--accent-foundation);
    color: #000;
}

.zone-intelligence .zone-badge {
    background: var(--accent-intelligence);
    color: #000;
}

.zone-mastery .zone-badge {
    background: var(--accent-mastery);
    color: #fff;
}

.zone-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.zone-header p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.roadmap-steps {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.roadmap-step {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    min-height: 100px;
}

.step-node {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: absolute;
    left: 40px;
    transform: translateX(-50%);
    z-index: 3;
    transition: all 0.3s ease;
    cursor: pointer;
}

.roadmap-step.active .step-node {
    border-color: currentColor;
    box-shadow: 0 0 15px currentColor;
    animation: pulseGlow 2s infinite;
}

.roadmap-step.completed .step-node::after {
    content: '✓';
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-foundation);
    color: #000;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step-content {
    margin-left: 80px;
    /* Offset from left-aligned node */
    width: calc(100% - 96px);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
}

.step-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
    line-height: 1.3;
}

.step-meta {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.roadmap-step.locked .step-content {
    opacity: 0.5;
    filter: grayscale(1);
}

.roadmap-step.locked .step-node {
    background: #1a1c23;
    color: #334155;
    border-color: #334155;
}

/* Path Roadmap View - Mobile Optimized */
.path-roadmap {
    padding: 24px 16px 60px 48px;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.path-roadmap::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.article-node {
    position: relative;
    padding-bottom: 32px;
}

.article-node::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 18px;
    width: 8px;
    height: 8px;
    background: #1a1c23;
    border: 2px solid var(--text-dim);
    border-radius: 50%;
    z-index: 2;
}

.article-node.completed::before {
    background: var(--accent-foundation);
    border-color: var(--accent-foundation);
    box-shadow: 0 0 8px var(--accent-foundation);
}

.article-node.current::before {
    background: var(--accent-intelligence);
    border-color: var(--accent-intelligence);
    width: 10px;
    height: 10px;
    left: -29px;
    box-shadow: 0 0 12px var(--accent-intelligence);
}

.article-node-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
}

.article-node-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.article-node-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}

.article-node-status {
    font-size: 11px;
    white-space: nowrap;
    color: var(--text-dim);
    margin-top: 2px;
}

.article-details {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

/* Header Adjustments for Mobile */
.mindlytx-header {
    padding: 0 16px;
    height: 64px;
}

.logo-name {
    font-size: 18px;
}

/* Global Progress */
#roadmapProgress {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-count {
    font-weight: 800;
    font-size: 14px;
    color: var(--accent-foundation);
}

.progress-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}


/* --- Tablet / Desktop Breaks --- */
@media (min-width: 768px) {
    .roadmap-container {
        padding: 80px 40px;
    }

    .roadmap-line {
        left: 50%;
        transform: translateX(-50%);
        opacity: 0.2;
    }

    .zone-header {
        text-align: center;
        padding-left: 0;
        margin-bottom: 80px;
    }

    .zone-header p {
        font-size: 16px;
        max-width: 480px;
    }

    .roadmap-steps {
        gap: 100px;
    }

    .roadmap-step {
        min-height: 140px;
    }

    .roadmap-step:nth-child(even) {
        flex-direction: row-reverse;
    }

    .step-node {
        left: 50%;
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .step-content {
        width: calc(50% - 60px);
        margin-left: 0;
        padding: 24px;
    }

    .roadmap-step:nth-child(odd) .step-content {
        margin-right: auto;
        margin-left: 0;
    }

    .roadmap-step:nth-child(even) .step-content {
        margin-left: auto;
        margin-right: 0;
    }

    .step-title {
        font-size: 20px;
    }

    .step-meta {
        font-size: 14px;
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px currentColor;
    }

    50% {
        box-shadow: 0 0 20px currentColor;
    }

    100% {
        box-shadow: 0 0 5px currentColor;
    }
}