/* Fresher Roadmap — a Candy-Crush-style map trail. Standalone page. */

/* Chatbot_UI.css pins html/body to 100% with overflow:hidden for the chat app;
   the roadmap is a normal scrolling document, so release that here. */
html { height: auto; }
body.roadmap-page {
    margin: 0;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Richer, layered background: warm glow, cool/purple accents, dotted grid. */
.roadmap-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 60% 42% at 50% -6%, rgba(250, 204, 21, 0.12) 0%, transparent 62%),
        radial-gradient(ellipse 46% 36% at 88% 12%, rgba(96, 165, 250, 0.08) 0%, transparent 62%),
        radial-gradient(ellipse 50% 40% at 8% 88%, rgba(192, 132, 252, 0.07) 0%, transparent 62%);
}
.roadmap-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    /* Same box grid as the chat UI (.bg-grid). */
    background-image:
        linear-gradient(rgba(128, 144, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(128, 144, 255, 0.12) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
}
body.light-mode .roadmap-bg {
    background:
        radial-gradient(ellipse 60% 42% at 50% -6%, rgba(250, 204, 21, 0.18) 0%, transparent 62%),
        radial-gradient(ellipse 46% 36% at 88% 12%, rgba(96, 165, 250, 0.12) 0%, transparent 62%),
        radial-gradient(ellipse 50% 40% at 8% 88%, rgba(192, 132, 252, 0.10) 0%, transparent 62%);
}
body.light-mode .roadmap-bg::after {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.12) 1px, transparent 1px);
}

/* Faint gold Eva marks, echoing the modal-card decoration. The PNG already
   carries ~0.5 alpha, so the CSS opacity is doubled to stay visible. */
.roadmap-eva {
    position: absolute;
    background: url("./gold-eva.png?v=3") no-repeat center / contain;
    opacity: 0.42;
    pointer-events: none;
}
.roadmap-eva-1 { width: 240px; height: 176px; top: 40%; left: -12px; transform: rotate(-9deg); }
.roadmap-eva-2 { width: 200px; height: 148px; top: 46%; right: 5%; }
.roadmap-eva-3 { width: 130px; height: 96px; bottom: 12%; left: -16px; transform: rotate(-10deg); opacity: 0.26; }
body.light-mode .roadmap-eva { opacity: 0.5; }
body.light-mode .roadmap-eva-3 { opacity: 0.32; }

/* Completion-modal gold mark: keep the 152x112 aspect ratio (no squish). */
.roadmap-complete-eva { width: 38px; height: auto; }

.roadmap-top {
    position: relative;
    z-index: 2;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.roadmap-top-left {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.roadmap-brand { display: inline-flex; align-items: center; }
.roadmap-brand img { height: 44px; width: auto; display: block; }

.roadmap-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-ink);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
}
.roadmap-back:hover {
    color: var(--brand-gold);
    transform: translateX(-2px);
}

.roadmap-signin {
    color: var(--brand-gold);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}
.roadmap-signin:hover { text-decoration: underline; }
.roadmap-signin[hidden] { display: none; }

.roadmap-wrap {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 0.5rem 1.25rem 4rem;
}

.roadmap-head { text-align: center; margin-bottom: 1.5rem; }
.roadmap-head h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.1rem;
    margin: 0 0 0.6rem;
    color: var(--ink);
    line-height: 1.15;
}
.roadmap-title-accent {
    background: linear-gradient(90deg, #ffd700 0%, #ffb300 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.roadmap-head p {
    color: var(--muted-ink);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 34rem;
    margin: 0 auto 1.5rem;
}

.roadmap-progress { max-width: 26rem; margin: 0 auto; }
.roadmap-progress-text {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-gold);
    margin-bottom: 0.55rem;
}
.roadmap-progress-track {
    position: relative;
    display: block;
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
/* Six milestone notches, painted over the fill. */
.roadmap-progress-track::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent calc(100% / 6 - 1.5px),
        rgba(5, 10, 24, 0.55) calc(100% / 6 - 1.5px),
        rgba(5, 10, 24, 0.55) calc(100% / 6)
    );
}
.roadmap-progress-fill {
    position: relative;
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffd700, #ffb300 70%, #ffe066);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
    overflow: hidden;
    transition: width 0.55s cubic-bezier(0.19, 1, 0.22, 1);
}
.roadmap-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.5) 50%, transparent 68%);
    transform: translateX(-100%);
    animation: roadmapShine 2.6s ease-in-out infinite;
}
@keyframes roadmapShine {
    0% { transform: translateX(-100%); }
    55%, 100% { transform: translateX(100%); }
}
body.light-mode .roadmap-progress-track {
    background: rgba(15, 23, 42, 0.1);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.15);
}
body.light-mode .roadmap-progress-track::after {
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent calc(100% / 6 - 1.5px),
        rgba(255, 255, 255, 0.7) calc(100% / 6 - 1.5px),
        rgba(255, 255, 255, 0.7) calc(100% / 6)
    );
}

/* ── Map trail ─────────────────────────────────────────────────────────── */
.roadmap-map {
    position: relative;
    margin-top: 1rem;
}

.roadmap-trail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 0;
}
.roadmap-ribbon {
    fill: none;
    stroke: rgba(250, 204, 21, 0.07);
    stroke-width: 34px;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
body.light-mode .roadmap-ribbon { stroke: rgba(180, 83, 9, 0.10); }
.roadmap-line {
    fill: none;
    stroke: rgba(250, 204, 21, 0.5);
    stroke-width: 3px;
    stroke-dasharray: 1 11;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}
body.light-mode .roadmap-line { stroke: rgba(180, 83, 9, 0.55); }

/* Level nodes: centered ON the trail */
.roadmap-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.16);
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    color: rgba(255, 255, 255, 0.82);
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
body.light-mode .roadmap-node {
    border-color: rgba(0, 0, 0, 0.16);
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.9));
    color: #334155;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.roadmap-node:hover { border-color: rgba(250, 204, 21, 0.55); }
.roadmap-node:active { transform: translate(-50%, -50%) scale(0.9); }
.roadmap-node:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 3px; }

.roadmap-node.done {
    border-color: var(--brand-gold);
    background: radial-gradient(circle at 30% 25%, #ffe066, #facc15 55%, #b45309);
    color: #1a1205;
    box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.12), 0 10px 24px rgba(0, 0, 0, 0.35);
}
.roadmap-node.current { border-color: rgba(250, 204, 21, 0.75); animation: roadmapPulse 2.2s ease-in-out infinite; }
.roadmap-node.pop { animation: roadmapPop 0.4s cubic-bezier(0.19, 1, 0.22, 1); }

@keyframes roadmapPop {
    0% { transform: translate(-50%, -50%) scale(1); }
    35% { transform: translate(-50%, -50%) scale(1.18); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes roadmapPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4); }
    50% { box-shadow: 0 0 0 14px rgba(250, 204, 21, 0); }
}

/* Labels: a clean column to the side of the trail (never over the line) */
.roadmap-label {
    position: absolute;
    left: 50%;
    width: calc(50% - 14px);
    transform: translateY(-50%);
    z-index: 2;
    text-align: left;
}
.roadmap-label strong { display: block; font-size: 0.98rem; color: var(--ink); }
.roadmap-label span { display: block; margin-top: 0.15rem; font-size: 0.82rem; color: var(--muted-ink); line-height: 1.4; }
.roadmap-label.done strong { color: var(--brand-gold); }

/* "You are here" map marker */
.roadmap-here {
    position: absolute;
    /* clear the node radius (36px) plus a gap so the arrow points at, not onto, the circle */
    transform: translate(-50%, calc(-100% - 52px));
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    pointer-events: none;
}
.roadmap-here-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-gold);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.22);
    animation: roadmapDot 1.8s ease-in-out infinite;
}
.roadmap-here-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--brand-gold);
    white-space: nowrap;
}
.roadmap-here-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid var(--brand-gold);
}
@keyframes roadmapDot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.28); }
    50% { box-shadow: 0 0 0 8px rgba(250, 204, 21, 0); }
}

@media (max-width: 480px) {
    .roadmap-head h1 { font-size: 1.65rem; }
    .roadmap-node { width: 58px; height: 58px; font-size: 1.25rem; border-width: 3px; }
    .roadmap-label { width: calc(50% - 8px); }
    .roadmap-label strong { font-size: 0.9rem; }
    .roadmap-label span { font-size: 0.76rem; }
    .roadmap-here { transform: translate(-50%, calc(-100% - 42px)); }
}

/* Much smaller gold Eva marks on phones so they read as texture, not clutter. */
@media (max-width: 640px) {
    .roadmap-eva-1 { width: 118px; height: 87px; }
    .roadmap-eva-2 { width: 96px; height: 71px; }
    .roadmap-eva-3 { width: 62px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
    .roadmap-node.current, .roadmap-node.pop, .roadmap-here-dot { animation: none; }
    .roadmap-progress-fill { transition: none; }
    .roadmap-progress-fill::after { animation: none; }
}

/* Sign-in gate: the roadmap is account-only. */
.roadmap-gate {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 3rem 1.25rem 4rem;
}
.roadmap-gate[hidden] { display: none; }
.roadmap-gate-card {
    max-width: 26rem;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
}
.roadmap-gate-eva { width: 76px; height: auto; margin-bottom: 1rem; }
.roadmap-gate-card h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: var(--ink);
    margin-bottom: 0.6rem;
}
.roadmap-gate-card p {
    color: var(--muted-ink);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.roadmap-gate-card .primary-btn { display: inline-flex; }
