@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500&family=Noto+Sans+JP:wght@200;300;400&family=Share+Tech+Mono&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #06060e;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: #e0dfe8;
}

#graph-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#graph-container canvas {
    display: block;
}

/* ---- TITLE ---- */
#title-overlay {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 10;
    pointer-events: none;
}

#title-overlay h1 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #05d9e8;
    text-shadow: 0 0 20px rgba(5, 217, 232, 0.3), 0 0 60px rgba(5, 217, 232, 0.1);
}

#title-overlay .subtitle {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 3px;
    color: rgba(5, 217, 232, 0.35);
    margin-top: 6px;
}

/* ---- GENRE LEGEND ---- */
#genre-legend {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.genre-legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(224, 223, 232, 0.85);
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s;
    user-select: none;
}

.genre-legend-item.hidden {
    opacity: 0.15;
}

.genre-legend-item:hover:not(.hidden) {
    color: rgba(224, 223, 232, 1);
}

#genre-show-all {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: rgba(5, 217, 232, 0.4);
    cursor: pointer;
    margin-top: 6px;
    text-transform: uppercase;
    display: none;
    transition: color 0.15s;
    pointer-events: all;
}

#genre-show-all:hover {
    color: rgba(5, 217, 232, 0.85);
}

.genre-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}

/* ---- OFF-SCREEN INDICATOR TOOLTIP ---- */
#indicator-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 100;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    background: rgba(6, 6, 14, 0.88);
    border: 1px solid rgba(5, 217, 232, 0.25);
    padding: 5px 11px;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s ease;
}
#indicator-tooltip.visible {
    opacity: 1;
}

/* ---- NODE COUNT ---- */
#node-count {
    position: fixed;
    bottom: 28px;
    right: 32px;
    z-index: 10;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 1.5px;
    color: rgba(5, 217, 232, 0.4);
    text-transform: uppercase;
    pointer-events: none;
    text-align: right;
}

#node-count .node-count-sub {
    font-size: 10px;
    color: rgba(224, 223, 232, 0.25);
    letter-spacing: 1px;
    margin-top: 3px;
}

/* ---- INFO PANEL ---- */
#info-panel {
    position: fixed;
    top: 0;
    right: -460px;
    width: 440px;
    height: 100vh;
    background: rgba(8, 8, 18, 0.95);
    border-left: 1px solid rgba(5, 217, 232, 0.1);
    z-index: 20;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(40px);
}

#info-panel::-webkit-scrollbar { width: 0px; }
#info-panel.open { right: 0; }

.panel-header {
    padding: 48px 36px 28px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.06);
    position: relative;
}

/* Neon accent line at top of panel */
.panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color, #05d9e8), transparent);
    opacity: 0.6;
}

.panel-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: 1px solid rgba(5, 217, 232, 0.15);
    color: rgba(5, 217, 232, 0.4);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.panel-close:hover {
    border-color: rgba(5, 217, 232, 0.4);
    color: #05d9e8;
    box-shadow: 0 0 12px rgba(5, 217, 232, 0.2);
}

.panel-genre-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.panel-title {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.3;
    color: rgba(224, 223, 232, 0.95);
}

.panel-title-jp {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
    font-weight: 200;
    margin-top: 6px;
    letter-spacing: 1px;
}

.panel-score {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(5, 217, 232, 0.75);
}

.panel-score > span:first-child {
    color: #05d9e8;
    font-size: 22px;
    text-shadow: 0 0 10px rgba(5, 217, 232, 0.3);
}

.panel-score-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---- CODEX SCORE INFO ICON ---- */
.codex-tooltip-wrap {
    display: inline-flex;
    align-items: center;
}

.codex-score-info {
    font-size: 11px;
    color: rgba(5, 217, 232, 0.35);
    cursor: pointer;
    font-style: normal;
    line-height: 1;
    transition: color 0.15s;
    user-select: none;
}

.codex-score-info:hover,
.codex-score-info.active {
    color: #05d9e8;
    text-shadow: 0 0 8px rgba(5, 217, 232, 0.4);
}

/* ---- CODEXSCORE FLYOUT ---- */
#info-flyout {
    position: fixed;
    right: 441px;
    width: 280px;
    padding: 28px 28px 24px;
    background: rgba(8, 8, 18, 0.97);
    border: 1px solid rgba(5, 217, 232, 0.12);
    border-top: 2px solid rgba(5, 217, 232, 0.55);
    border-right: none;
    backdrop-filter: blur(40px);
    z-index: 19;
    pointer-events: none;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(5, 217, 232, 0.04);
}

#info-flyout.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

#info-flyout .flyout-header {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #05d9e8;
    text-shadow: 0 0 12px rgba(5, 217, 232, 0.3);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.08);
}

#info-flyout .flyout-body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.85;
    color: rgba(224, 223, 232, 0.6);
    letter-spacing: 0.1px;
}

.panel-body { padding: 24px 36px 48px; }

.panel-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.genre-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 2px;
    border: 1px solid rgba(5, 217, 232, 0.2);
    color: rgba(5, 217, 232, 0.6);
}

.panel-synopsis {
    font-size: 13px;
    line-height: 1.9;
    color: rgba(224, 223, 232, 0.75);
    font-weight: 300;
    letter-spacing: 0.15px;
    margin-bottom: 28px;
}

.panel-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(5, 217, 232, 0.04);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 32px;
}

.stat-cell {
    background: rgba(8, 8, 18, 0.8);
    padding: 14px 16px;
}

.stat-cell .label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.5);
    margin-bottom: 4px;
}

.stat-cell .value {
    font-size: 13px;
    color: rgba(224, 223, 232, 0.9);
    font-weight: 300;
}

.connections-section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.04);
}

.connection-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    transition: padding-left 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.connection-item:hover { padding-left: 8px; }
.connection-item:hover .conn-title { color: rgba(224, 223, 232, 0.95); }

.conn-accent {
    width: 2px;
    height: 16px;
    border-radius: 0;
    margin-top: 3px;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.conn-title {
    font-size: 13px;
    color: rgba(224, 223, 232, 0.85);
    font-weight: 300;
    transition: color 0.15s;
}

.conn-reason {
    font-size: 11px;
    color: rgba(224, 223, 232, 0.5);
    font-weight: 300;
    margin-top: 2px;
    line-height: 1.5;
}

.connections-group { margin-bottom: 24px; }

/* ---- WHAT'S NEXT ---- */
.whats-next-section {
    margin-bottom: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.04);
}

.whats-next-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #05d9e8;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.04);
}

.whats-next-info {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: rgba(5, 217, 232, 0.35);
    cursor: pointer;
    font-style: normal;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    transition: color 0.15s;
    user-select: none;
}

.whats-next-info:hover,
.whats-next-info.active {
    color: #05d9e8;
    text-shadow: 0 0 8px rgba(5, 217, 232, 0.4);
}

.rec-type-tag {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 1px;
    margin-top: 4px;
    opacity: 0.7;
}

/* ---- SEARCH BAR ---- */
#search-bar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 300px;
}

#search-input {
    width: 100%;
    background: rgba(8, 8, 18, 0.85);
    border: 1px solid rgba(5, 217, 232, 0.15);
    border-radius: 2px;
    padding: 10px 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: #e0dfe8;
    outline: none;
    backdrop-filter: blur(20px);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input::placeholder {
    color: rgba(5, 217, 232, 0.45);
}

#search-input:focus {
    border-color: rgba(5, 217, 232, 0.4);
    box-shadow: 0 0 16px rgba(5, 217, 232, 0.08);
}

#search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: rgba(8, 8, 18, 0.95);
    border: 1px solid rgba(5, 217, 232, 0.12);
    border-radius: 2px;
    backdrop-filter: blur(20px);
    max-height: 280px;
    overflow-y: auto;
}

#search-results::-webkit-scrollbar { width: 0; }

#search-results.visible {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
}

.search-result-item:hover,
.search-result-item.selected {
    background: rgba(5, 217, 232, 0.06);
}

.search-result-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.search-result-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: rgba(224, 223, 232, 0.85);
}

.search-result-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(224, 223, 232, 0.5);
    margin-left: auto;
    flex-shrink: 0;
}

/* ---- EDGE TYPE FILTERS ---- */
#edge-type-filters {
    position: fixed;
    bottom: 28px;
    left: 32px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-section-label,
.edge-filter-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(5, 217, 232, 0.4);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.edge-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    opacity: 0.85;
    border-radius: 2px;
    border: 1px solid;
    cursor: pointer;
    background: transparent;
    transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

/* Toggled off: clearly muted but still readable, not invisible */
.filter-btn.off {
    opacity: 0.5;
    border-color: rgba(224, 223, 232, 0.16) !important;
    color: rgba(224, 223, 232, 0.42) !important;
    box-shadow: none !important;
}

.filter-btn.off:hover {
    opacity: 0.7;
    border-color: rgba(224, 223, 232, 0.28) !important;
    color: rgba(224, 223, 232, 0.6) !important;
}

/* ---- PATHS BUTTON ---- */
#paths-btn {
    position: fixed;
    top: 110px;
    left: 32px;
    z-index: 10;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.45);
    background: rgba(8, 8, 18, 0.6);
    border: 1px solid rgba(5, 217, 232, 0.2);
    padding: 8px 16px;
    border-radius: 2px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

#paths-btn:hover {
    color: rgba(5, 217, 232, 0.7);
    border-color: rgba(5, 217, 232, 0.4);
    box-shadow: 0 0 12px rgba(5, 217, 232, 0.12);
}

#paths-btn.active {
    color: #05d9e8;
    border-color: rgba(5, 217, 232, 0.6);
    box-shadow: 0 0 16px rgba(5, 217, 232, 0.2);
}

/* ---- PATHS PANEL ---- */
#paths-panel {
    position: fixed;
    top: 0;
    left: -380px;
    width: 360px;
    height: 100vh;
    background: rgba(8, 8, 18, 0.95);
    border-right: 1px solid rgba(5, 217, 232, 0.08);
    z-index: 20;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(40px);
}

#paths-panel::-webkit-scrollbar { width: 0px; }
#paths-panel.open { left: 0; }

.paths-panel-header {
    padding: 48px 28px 20px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.06);
    position: relative;
}

.paths-panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #05d9e8, transparent);
    opacity: 0.4;
}

.paths-panel-title-main {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    letter-spacing: 3px;
    color: #05d9e8;
    text-shadow: 0 0 16px rgba(5, 217, 232, 0.25);
}

.paths-panel-title-sub {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.5);
    margin-top: 5px;
}

/* keep for backward compat */
.paths-panel-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.65);
}

.paths-panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid rgba(5, 217, 232, 0.15);
    color: rgba(5, 217, 232, 0.4);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.paths-panel-close:hover {
    border-color: rgba(5, 217, 232, 0.4);
    color: #05d9e8;
    box-shadow: 0 0 12px rgba(5, 217, 232, 0.2);
}

/* ---- PATH CARDS ---- */
.paths-list { padding: 16px 0; }

.path-card {
    padding: 18px 28px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.04);
    cursor: pointer;
    transition: background 0.15s, padding-left 0.15s;
}

.path-card:hover {
    background: rgba(5, 217, 232, 0.03);
    padding-left: 34px;
}

.path-card:hover .path-card-title { color: rgba(224, 223, 232, 0.95); }

.path-card-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 300;
    color: rgba(224, 223, 232, 0.8);
    margin-bottom: 6px;
    transition: color 0.15s;
}

.path-card-desc {
    font-size: 11px;
    color: rgba(224, 223, 232, 0.55);
    line-height: 1.6;
    margin-bottom: 10px;
    font-weight: 300;
}

.path-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.path-type-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 1px;
}

.path-type-tag.franchise {
    color: #ffb800;
    background: rgba(255, 184, 0, 0.08);
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.path-type-tag.curated {
    color: #01ffc3;
    background: rgba(1, 255, 195, 0.06);
    border: 1px solid rgba(1, 255, 195, 0.15);
}

.path-anime-count {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(224, 223, 232, 0.45);
    letter-spacing: 1px;
}

/* ---- INTENSITY TAG ---- */
.path-intensity-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 1px;
}

.path-intensity-tag.light {
    color: #01ffc3;
    background: rgba(1, 255, 195, 0.05);
    border: 1px solid rgba(1, 255, 195, 0.2);
}

.path-intensity-tag.medium {
    color: #ffb800;
    background: rgba(255, 184, 0, 0.05);
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.path-intensity-tag.heavy {
    color: #ff2a6d;
    background: rgba(255, 42, 109, 0.05);
    border: 1px solid rgba(255, 42, 109, 0.2);
}

.path-intensity-tag.long {
    color: #ffb800;
    background: rgba(255, 184, 0, 0.05);
    border: 1px solid rgba(255, 184, 0, 0.2);
}

/* ---- PATH CATEGORIES ---- */
.paths-category {
    border-bottom: 1px solid rgba(5, 217, 232, 0.04);
}

.paths-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.paths-category-header:hover {
    background: rgba(5, 217, 232, 0.03);
}

.paths-category-icon {
    font-size: 12px;
    color: rgba(5, 217, 232, 0.5);
    width: 16px;
    text-align: center;
}

.paths-category-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(224, 223, 232, 0.65);
    flex: 1;
}

.paths-category-count {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(5, 217, 232, 0.3);
}

.paths-category-arrow {
    font-size: 11px;
    color: rgba(224, 223, 232, 0.3);
    transition: transform 0.2s;
}

.paths-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.paths-category-content.open {
    max-height: 12000px;
}

/* ---- EXPAND / COLLAPSE ALL ---- */
.paths-list-controls {
    display: flex;
    justify-content: flex-end;
    padding: 10px 28px 6px;
}

.paths-expand-all {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.4);
    background: none;
    border: none;
    padding: 4px 2px;
    cursor: pointer;
    transition: color 0.15s, text-shadow 0.15s;
}

.paths-expand-all:hover {
    color: #05d9e8;
    text-shadow: 0 0 10px rgba(5, 217, 232, 0.4);
}

/* ---- FILTER BANNER ---- */
.paths-filter-banner {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(5, 217, 232, 0.04);
    border: 1px solid rgba(5, 217, 232, 0.1);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.paths-filter-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: rgba(224, 223, 232, 0.5);
}

.paths-filter-text strong {
    color: #05d9e8;
    font-weight: 400;
}

.paths-filter-clear {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.4);
    background: none;
    border: 1px solid rgba(5, 217, 232, 0.15);
    padding: 4px 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.paths-filter-clear:hover {
    color: #05d9e8;
    border-color: rgba(5, 217, 232, 0.4);
}

/* ---- PATHS BUTTON PULSE ---- */
#paths-btn.has-paths {
    border-color: #05d9e8;
    color: #05d9e8;
    animation: pathsPulse 2s ease-in-out infinite;
}

@keyframes pathsPulse {
    0%, 100% {
        box-shadow: 0 0 6px rgba(5, 217, 232, 0.15);
    }
    50% {
        box-shadow: 0 0 20px rgba(5, 217, 232, 0.4), 0 0 40px rgba(5, 217, 232, 0.1);
        border-color: rgba(5, 217, 232, 0.8);
    }
}

/* ---- PATH DETAIL ---- */
.path-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.5);
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 14px;
    padding: 0;
    transition: color 0.15s;
}

.path-back-btn:hover { color: rgba(5, 217, 232, 0.7); }

.path-detail-header {
    padding: 20px 28px 20px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.06);
    position: relative;
}

.path-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #05d9e8, transparent);
    opacity: 0.3;
}

.path-detail-title {
    font-size: 18px;
    font-weight: 300;
    color: rgba(224, 223, 232, 0.9);
    margin-bottom: 8px;
    margin-top: 6px;
}

.path-detail-desc {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(224, 223, 232, 0.6);
    font-weight: 300;
}

/* ---- ORDER SELECTOR ---- */
.order-selector {
    display: flex;
    gap: 6px;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(5, 217, 232, 0.04);
    flex-wrap: wrap;
}

.order-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 2px;
    border: 1px solid rgba(5, 217, 232, 0.2);
    color: rgba(5, 217, 232, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.order-btn:hover {
    border-color: rgba(5, 217, 232, 0.35);
    color: rgba(5, 217, 232, 0.6);
}

.order-btn.active {
    border-color: rgba(5, 217, 232, 0.6);
    color: #05d9e8;
    background: rgba(5, 217, 232, 0.06);
    box-shadow: 0 0 8px rgba(5, 217, 232, 0.1);
}

/* ---- PATH STATS BAR ---- */
.path-stats {
    display: flex;
    background: rgba(5, 217, 232, 0.03);
    border-bottom: 1px solid rgba(5, 217, 232, 0.04);
}

.path-stat {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    border-right: 1px solid rgba(5, 217, 232, 0.04);
}

.path-stat:last-child { border-right: none; }

.path-stat .s-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.45);
    margin-bottom: 4px;
}

.path-stat .s-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: rgba(224, 223, 232, 0.75);
}

/* ---- STEP LIST ---- */
.path-steps { padding: 20px 28px 40px; }

.path-step {
    display: flex;
    gap: 14px;
    position: relative;
    cursor: pointer;
}

.path-step:hover .step-title { color: rgba(224, 223, 232, 0.95); }

.step-spine {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 24px;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(5, 217, 232, 0.3);
    background: rgba(5, 217, 232, 0.06);
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: rgba(5, 217, 232, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(5, 217, 232, 0.1);
    z-index: 1;
}

.step-line {
    width: 1px;
    flex: 1;
    min-height: 20px;
    background: linear-gradient(to bottom, rgba(5, 217, 232, 0.15), rgba(5, 217, 232, 0.04));
    margin-top: 4px;
    margin-bottom: 4px;
}

.path-step:last-child .step-line { display: none; }

.path-step.origin-step {
    background: rgba(5, 217, 232, 0.04);
    border-left: 2px solid rgba(5, 217, 232, 0.3);
    margin-left: -2px;
}

.path-step.origin-step .step-num {
    border-color: #05d9e8;
    color: #05d9e8;
    background: rgba(5, 217, 232, 0.12);
    box-shadow: 0 0 12px rgba(5, 217, 232, 0.25);
}

.path-step.origin-step .step-title {
    color: #05d9e8;
}

.step-content {
    padding-top: 2px;
    padding-bottom: 20px;
    flex: 1;
}

.step-title {
    font-size: 13px;
    color: rgba(224, 223, 232, 0.7);
    font-weight: 300;
    margin-bottom: 3px;
    transition: color 0.15s;
}

.step-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(224, 223, 232, 0.5);
    margin-bottom: 7px;
}

.step-note {
    font-size: 11px;
    line-height: 1.65;
    color: rgba(224, 223, 232, 0.55);
    font-weight: 300;
    margin-bottom: 8px;
}

.step-tag {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 1px;
}

.step-tag.essential {
    color: #05d9e8;
    background: rgba(5, 217, 232, 0.05);
    border: 1px solid rgba(5, 217, 232, 0.25);
}

.step-tag.optional {
    color: #ffb800;
    background: rgba(255, 184, 0, 0.05);
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.step-tag.movie {
    color: #d300c5;
    background: rgba(211, 0, 197, 0.06);
    border: 1px solid rgba(211, 0, 197, 0.15);
}

.step-tag.recommended {
    color: #01ffc3;
    background: rgba(1, 255, 195, 0.05);
    border: 1px solid rgba(1, 255, 195, 0.2);
}

.step-tag.skip-ok {
    color: rgba(160, 160, 180, 0.6);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.path-step-universe {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 1px;
    background: rgba(5, 217, 232, 0.15);
    color: #05d9e8;
    border: 1px solid rgba(5, 217, 232, 0.3);
}

.path-transition {
    margin: 4px 0 4px 48px;
    padding: 6px 10px 6px 14px;
    font-size: 11px;
    font-style: italic;
    color: rgba(160, 160, 200, 0.55);
    border-left: 1px solid rgba(5, 217, 232, 0.15);
    line-height: 1.5;
}

.path-order-description {
    margin: 6px 28px 10px;
    padding: 8px 12px;
    font-size: 11px;
    color: rgba(160, 160, 200, 0.55);
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(5, 217, 232, 0.2);
    line-height: 1.5;
}


/* ---- ABOUT BUTTON ---- */
#about-btn {
    position: fixed;
    bottom: 72px;
    right: 32px;
    z-index: 10;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(5, 217, 232, 0.2);
    color: rgba(5, 217, 232, 0.45);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

#about-btn:hover {
    border-color: rgba(5, 217, 232, 0.5);
    color: #05d9e8;
    box-shadow: 0 0 12px rgba(5, 217, 232, 0.2);
}

/* ---- ABOUT OVERLAY ---- */
#about-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(6, 6, 14, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
}

#about-overlay.open {
    display: flex;
}

#about-panel {
    position: relative;
    width: 420px;
    max-width: calc(100vw - 48px);
    background: rgba(8, 8, 18, 0.97);
    border: 1px solid rgba(5, 217, 232, 0.15);
    border-top: 2px solid rgba(5, 217, 232, 0.5);
    backdrop-filter: blur(40px);
    padding: 40px 36px 36px;
}

.about-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: 1px solid rgba(5, 217, 232, 0.15);
    color: rgba(5, 217, 232, 0.4);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.about-close:hover {
    border-color: rgba(5, 217, 232, 0.4);
    color: #05d9e8;
    box-shadow: 0 0 10px rgba(5, 217, 232, 0.15);
}

.about-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #05d9e8;
    text-shadow: 0 0 20px rgba(5, 217, 232, 0.3);
    margin-bottom: 28px;
}

.about-section {
    margin-bottom: 24px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.5);
    margin-bottom: 10px;
}

.about-section p {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(224, 223, 232, 0.6);
    font-weight: 300;
    margin-bottom: 8px;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-link {
    color: #05d9e8;
    text-decoration: none;
    border-bottom: 1px solid rgba(5, 217, 232, 0.3);
    text-shadow: 0 0 10px rgba(5, 217, 232, 0.25);
    transition: border-color 0.2s, text-shadow 0.2s;
}

.about-link:hover {
    border-bottom-color: rgba(5, 217, 232, 0.7);
    text-shadow: 0 0 14px rgba(5, 217, 232, 0.5);
}

.about-version {
    margin-top: 28px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(224, 223, 232, 0.25);
    text-align: right;
}

/* ---- MOBILE WARNING ---- */
/* Hidden on desktop; the media query below reveals it on small / touch screens.
   CSS-driven so it appears even if the WebGL libraries fail to load. */
#mobile-warning {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 6, 14, 0.94);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) {
    #mobile-warning {
        display: flex;
    }
}

#mobile-warning.dismissed {
    display: none;
}

#mobile-warning-panel {
    width: 100%;
    max-width: 380px;
    background: rgba(8, 8, 18, 0.97);
    border: 1px solid rgba(5, 217, 232, 0.15);
    border-top: 2px solid rgba(5, 217, 232, 0.5);
    padding: 40px 32px 32px;
    text-align: center;
}

.mobile-warning-glyph {
    font-size: 28px;
    color: #05d9e8;
    text-shadow: 0 0 20px rgba(5, 217, 232, 0.5);
    margin-bottom: 20px;
}

.mobile-warning-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #05d9e8;
    text-shadow: 0 0 20px rgba(5, 217, 232, 0.3);
    margin-bottom: 8px;
}

.mobile-warning-sub {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 4px;
    color: rgba(5, 217, 232, 0.5);
    margin-bottom: 24px;
}

.mobile-warning-body {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(224, 223, 232, 0.65);
    font-weight: 300;
    margin-bottom: 28px;
}

.mobile-warning-continue {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(5, 217, 232, 0.8);
    background: rgba(5, 217, 232, 0.06);
    border: 1px solid rgba(5, 217, 232, 0.3);
    border-radius: 2px;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.mobile-warning-continue:hover,
.mobile-warning-continue:active {
    color: #05d9e8;
    background: rgba(5, 217, 232, 0.12);
    box-shadow: 0 0 16px rgba(5, 217, 232, 0.15);
}

/* ---- BACKGROUND ---- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
