:root {
    --bg-color: #030407;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-primary: #ffffff;
    --text-secondary: #64748b;
    --accent-blue: #38bdf8;
    --accent-purple: #818cf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    position: fixed;
    inset: 0;
    touch-action: none; 
    overscroll-behavior: none; 
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(ellipse at top left, rgba(56, 189, 248, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(129, 140, 248, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 0%, #030407 100%);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

#game-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.header {
    padding: clamp(0.5rem, 2vmin, 1.5rem);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.score-container, .stars-container, .best-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: clamp(0.6rem, 1.5vmin, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-value-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

#score, #best, #stars-display {
    font-size: clamp(1.5rem, 6vmin, 2.5rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: transform 0.1s ease-out;
}

#stars-display { color: #fbbf24; }

/* Overlay Reset */
.overlay {
    position: fixed; 
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 4, 7, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
    padding: clamp(0.5rem, 1.5vmin, 1.5rem) 1rem;
    z-index: 20;
    overflow-y: auto;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.overlay::-webkit-scrollbar { display: none; }

.overlay-content {
    width: 100%;
    max-width: 600px;
    margin: auto; 
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

@media (max-height: 750px) {
    .overlay-content {
        margin: 0 auto;
        padding-top: clamp(0.5rem, 2vmin, 3rem);
        padding-bottom: clamp(0.5rem, 2vmin, 3rem);
    }
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

h1 {
    font-size: clamp(1.8rem, 8vmin, 4rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: clamp(0.2rem, 1.5vmin, 0.5rem);
    background: linear-gradient(to bottom, #ffffff, #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

h2 {
    font-size: clamp(1.5rem, 6vmin, 3rem);
    margin-bottom: clamp(0.5rem, 2vmin, 1rem);
}

p {
    color: var(--text-secondary);
    margin-bottom: clamp(0.5rem, 2vmin, 1rem);
    font-size: clamp(0.9rem, 3vmin, 1.1rem);
    font-weight: 300;
}

.home-stars-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: clamp(1.2rem, 5vmin, 1.5rem);
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: clamp(0.5rem, 3vmin, 1.5rem);
    background: rgba(0, 0, 0, 0.4);
    padding: clamp(0.3rem, 1.5vmin, 0.5rem) clamp(1rem, 4vmin, 1.5rem);
    border-radius: 50px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.star-icon { width: 1em; height: 1em; border-radius: 50%; object-fit: cover; vertical-align: middle; }

/* Missions UI */
.missions-panel {
    background: rgba(0, 0, 0, 0.4);
    padding: clamp(0.5rem, 2vmin, 1rem);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    margin-bottom: clamp(0.5rem, 2vmin, 1.5rem);
}

.mission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mission-item:last-child { border-bottom: none; padding-bottom: 0; }

.mission-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.2rem;
    flex: 1;
    margin-right: 10px;
}

.mission-desc { font-size: clamp(0.8rem, 2.5vmin, 0.95rem); font-weight: 600; color: #e2e8f0; }
.mission-prog { font-size: clamp(0.7rem, 2vmin, 0.8rem); color: #94a3b8; }

.mission-btn {
    background: #334155;
    color: #e2e8f0;
    padding: 0.4rem 0.8rem;
    font-size: clamp(0.7rem, 2.5vmin, 0.85rem);
    min-width: 85px;
    height: auto;
}
.mission-btn.ready {
    background: #10b981; color: #fff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
    animation: pulseReady 1.5s infinite alternate;
}
@keyframes pulseReady {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.reroll-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: 1rem;
    height: 32px;
    width: auto;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: none;
    min-width: 54px;
}
.reroll-btn:hover { background: rgba(56, 189, 248, 0.2); transform: scale(1.1); box-shadow: none; }

/* Shop Elements */
.shop-container {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: clamp(0.5rem, 2vmin, 1rem);
    margin-bottom: clamp(0.5rem, 2vmin, 1rem);
}

.shop-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.shop-tab {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    box-shadow: none;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    position: relative;
    min-width: unset;
}

.shop-tab.active { color: var(--accent-blue); transform: none; }
.shop-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    box-shadow: 0 0 5px var(--accent-blue);
}
.shop-tab:hover { background: transparent; transform: none; box-shadow: none; color: #fff;}

.skin-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 3vmin, 1.5rem);
}

.skin-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: clamp(120px, 25vmin, 160px);
    height: clamp(110px, 20vmin, 150px);
}

.skin-name { font-weight: 800; font-size: clamp(0.8rem, 3vmin, 1rem); }
.skin-effect { font-size: clamp(0.65rem, 2.5vmin, 0.85rem); font-weight: 600; height: 1rem; }
#skin-preview-canvas { width: clamp(60px, 12vmin, 90px); height: clamp(60px, 12vmin, 90px); }

.skin-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: clamp(1.2rem, 4vmin, 1.5rem);
    width: clamp(30px, 8vmin, 40px);
    height: clamp(30px, 8vmin, 40px);
    padding: 0;
    min-width: unset;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}
.skin-btn:hover { background: rgba(255, 255, 255, 0.1); box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1); transform: scale(1.1); }

button {
    background: #ffffff;
    color: #000;
    border: none;
    padding: clamp(0.5rem, 2vmin, 1rem) clamp(1rem, 4vmin, 2rem);
    font-size: clamp(0.8rem, 3vmin, 1rem);
    font-weight: 800;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
button:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 20px 60px rgba(255, 255, 255, 0.2); }
button:active { transform: translateY(0) scale(0.98); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.buy-btn {
    background: var(--accent-blue); color: #000;
    font-size: clamp(0.7rem, 2vmin, 0.8rem);
    padding: clamp(0.3rem, 1vmin, 0.4rem) clamp(0.5rem, 2vmin, 1rem);
    margin-top: 0.2rem; min-width: clamp(80px, 20vmin, 100px); height: auto;
}
.buy-btn:disabled { background: #334155; color: #94a3b8; }

.final-stats { display: flex; gap: clamp(1rem, 5vmin, 3rem); margin-bottom: clamp(1rem, 3vmin, 2rem); justify-content: center; }
.stat { display: flex; flex-direction: column; }
.stat > span:last-child { font-size: clamp(1.8rem, 6vmin, 3rem); font-weight: 800; }

.mode-buttons { display: flex; gap: clamp(0.5rem, 2vmin, 1rem); flex-wrap: wrap; justify-content: center; }
.mode-buttons button { min-width: clamp(120px, 30vmin, 160px); }
#survival-button { background: linear-gradient(135deg, #f97316, #ef4444); color: #fff; }
#survival-button:hover { box-shadow: 0 20px 60px rgba(249, 115, 22, 0.4); }

.days-container { display: flex; gap: clamp(0.4rem, 1.5vmin, 0.8rem); margin-bottom: clamp(1rem, 3vmin, 2rem); flex-wrap: wrap; justify-content: center; max-width: 600px; }
.day-item { background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; padding: clamp(0.5rem, 1.5vmin, 1rem) clamp(0.2rem, 1vmin, 0.5rem); display: flex; flex-direction: column; align-items: center; min-width: clamp(50px, 15vmin, 80px); opacity: 0.6; transition: all 0.3s ease; }
.day-item.active { border-color: var(--accent-blue); background: rgba(56, 189, 248, 0.15); opacity: 1; transform: scale(1.1); box-shadow: 0 0 20px rgba(56, 189, 248, 0.4); }
.day-item.claimed { border-color: #10b981; opacity: 0.4; }
.day-title { font-size: clamp(0.6rem, 2vmin, 0.8rem); color: var(--text-secondary); margin-bottom: clamp(0.2rem, 1vmin, 0.5rem); font-weight: 800; }
.day-reward { font-weight: 800; font-size: clamp(0.8rem, 3vmin, 1.1rem); text-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; }

.leaderboard-container { width: 100%; max-width: 450px; background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(168, 85, 247, 0.3); border-radius: 12px; padding: clamp(0.5rem, 2vmin, 1rem); max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; box-shadow: 0 0 40px rgba(168, 85, 247, 0.1); }
.lb-entry { display: flex; justify-content: space-between; align-items: center; padding: clamp(0.4rem, 1.2vmin, 0.6rem) clamp(0.5rem, 2vmin, 0.8rem); background: rgba(0, 0, 0, 0.4); border-radius: 8px; font-size: clamp(0.85rem, 2.5vmin, 1rem); }
.lb-rank { font-weight: 800; color: var(--accent-purple); width: clamp(25px, 6vmin, 35px); text-align: left; }
.lb-score { font-weight: 800; color: #fbbf24; text-align: right; min-width: clamp(60px, 15vmin, 80px); }
.lb-name-container { display: flex; align-items: center; gap: 0.6rem; flex-grow: 1; overflow: hidden; margin: 0 0.5rem; }
.lb-pfp { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.3); }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-align: left; }
.lb-entry.current-user { border: 1px solid var(--accent-purple); background: rgba(168, 85, 247, 0.15); transform: scale(1.02); }

/* Fullscreen Immersive Jedi Skill Tree Viewport */
.overlay.jedi-fullscreen-overlay {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #030712 !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    display: block !important;
    z-index: 50 !important;
}

.jedi-tree-viewport {
    position: absolute !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: radial-gradient(circle at 50% 80%, rgba(30, 41, 59, 0.45) 0%, rgba(3, 7, 18, 0.98) 75%) !important;
    box-shadow: none !important;
    z-index: 1;
}

#jedi-tree-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.jedi-tree-nodes-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Floating Top Right Close & Stars */
.jedi-header-pills {
    position: absolute !important;
    top: clamp(0.75rem, 2.5vmin, 1.5rem) !important;
    right: clamp(0.75rem, 3vmin, 2rem) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.jedi-bottom-bar {
    position: absolute !important;
    bottom: clamp(0.75rem, 2.5vmin, 1.5rem) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(92vw, 760px) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.8rem 1.4rem !important;
    background: rgba(2, 6, 23, 0.75) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.category-tag {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    user-select: none;
    opacity: 0.85;
}
.category-tag .cat-title {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #f97316;
}
.category-tag .cat-sub {
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    color: #94a3b8;
    font-weight: 700;
}
.tag-left { top: 16%; left: 28%; transform: translateX(-50%); }
.tag-center { top: 14%; left: 50%; transform: translateX(-50%); }
.tag-right { top: 16%; left: 72%; transform: translateX(-50%); }

/* Jedi Circular Nodes */
.jedi-node {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    user-select: none;
}
.jedi-node .jedi-node-icon {
    width: 21px;
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.25s ease;
}
.jedi-node .jedi-node-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.jedi-node:hover {
    transform: translate(-50%, -50%) scale(1.12);
    border-color: #94a3b8;
}
.jedi-node:hover .jedi-node-icon {
    color: #e2e8f0;
}
.jedi-node.selected {
    transform: translate(-50%, -50%) scale(1.18);
    border-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), 0 0 0 8px rgba(56, 189, 248, 0.35), 0 0 25px rgba(255, 255, 255, 0.6);
}
.jedi-node.selected .jedi-node-icon {
    color: #ffffff;
}
.jedi-node.learned {
    background: #f8fafc;
    border-color: #f8fafc;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}
.jedi-node.learned .jedi-node-icon {
    color: #0f172a;
}
.jedi-node.available {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}
.jedi-node.available .jedi-node-icon {
    color: #38bdf8;
}
.jedi-node.locked {
    opacity: 0.35;
    border-style: solid;
    border-color: #334155;
}
.jedi-node.locked .jedi-node-icon {
    color: #475569;
}
.jedi-node-status {
    display: none !important;
}
.jedi-node:focus-visible {
    outline: 2px solid #f8fafc;
    outline-offset: 5px;
}

/* Node Labels Next to Nodes */
.jedi-node-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.label-right .jedi-node-label {
    left: calc(100% + 14px);
    align-items: flex-start;
    text-align: left;
}

.label-left .jedi-node-label {
    right: calc(100% + 14px);
    align-items: flex-end;
    text-align: right;
}

/* Only when Selected or Hovered: Display the sleek glowing glass card box */
.jedi-node:hover .jedi-node-label,
.jedi-node.selected .jedi-node-label {
    padding: 7px 11px;
    background: rgba(11, 19, 38, 0.90);
    border-color: rgba(56, 189, 248, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(56, 189, 248, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.jedi-node.learned.selected .jedi-node-label {
    border-color: rgba(74, 222, 128, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(74, 222, 128, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.jedi-node-name {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #cbd5e1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.jedi-node-tier {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #64748b;
    text-transform: uppercase;
}

.jedi-node:hover .jedi-node-name,
.jedi-node.selected .jedi-node-name {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
}

.jedi-node:hover .jedi-node-tier,
.jedi-node.selected .jedi-node-tier {
    color: #38bdf8;
}

/* Effect Text Appears on Click / Selection */
.jedi-node-effect {
    font-size: 0.65rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 6px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.jedi-node.selected .jedi-node-effect {
    opacity: 1;
    max-height: 30px;
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25), 0 4px 15px rgba(0, 0, 0, 0.5);
}

.jedi-node.learned .jedi-node-name {
    color: #e2e8f0;
}
.jedi-node.learned .jedi-node-tier {
    color: #10b981;
}
.jedi-node.learned.selected .jedi-node-effect {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
}
}
.jedi-node.locked {
    opacity: 0.45;
}
.jedi-node.locked .jedi-node-name {
    color: #64748b;
}

/* Mobile & Small Screen Adaptations */
@media (max-width: 680px) {
    .jedi-tree-modal {
        padding: 1rem 0.8rem !important;
        width: 98% !important;
    }
    .jedi-tree-viewport {
        height: clamp(260px, 46vh, 340px) !important;
    }
    .jedi-node {
        width: 36px;
        height: 36px;
    }
    .jedi-node.root-node {
        width: 42px;
        height: 42px;
    }
    .jedi-node .jedi-node-icon {
        font-size: 1.05rem;
    }
    .category-tag .cat-title {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    .category-tag .cat-sub {
        display: none;
    }
    .tag-left { top: 30%; left: 3%; }
    .tag-center { top: 2%; }
    .tag-right { top: 30%; right: 3%; }
    .jedi-top-bar {
        margin-bottom: 0.4rem;
        gap: 0.5rem;
    }
    #jedi-selected-title {
        font-size: 1.1rem;
    }
    #jedi-selected-desc {
        font-size: 0.75rem;
    }
    .jedi-bottom-bar {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    .jedi-learn-btn {
        padding: 0.5rem 1.2rem !important;
        font-size: 0.75rem !important;
    }
}


/* Root Core Node */
.jedi-node.root-node {
    width: 52px;
    height: 52px;
}

/* Bottom Bar */
.jedi-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.jedi-points-status {
    text-align: left;
}

#jedi-points-text {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #94a3b8;
}

.jedi-progress-rail {
    width: 180px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.jedi-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f97316, #fbbf24);
    transition: width 0.3s ease;
}

.jedi-learn-btn {
    background: #f8fafc !important;
    color: #0f172a !important;
    font-weight: 900 !important;
    letter-spacing: 1.5px !important;
    padding: 0.6rem 1.8rem !important;
    border-radius: 100px !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25) !important;
}
.jedi-learn-btn:disabled {
    background: #1e293b !important;
    color: #475569 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}




.falling-star { position: fixed; top: -100px; border-radius: 50%; z-index: 100; pointer-events: none; animation: fall linear forwards; box-shadow: 0 0 15px rgba(251, 191, 36, 0.8); object-fit: cover; }
@keyframes fall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(120vh) rotate(720deg); opacity: 0; } }