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

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:wght@400;700&family=Roboto:wght@300;400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1428 100%);
    color: #e0e0e0;
    overflow: hidden;
    height: 100vh;
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(100, 200, 255, 0.05) 25%, rgba(100, 200, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(100, 200, 255, 0.05) 75%, rgba(100, 200, 255, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(100, 200, 255, 0.05) 25%, rgba(100, 200, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(100, 200, 255, 0.05) 75%, rgba(100, 200, 255, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.9) 0%, rgba(26, 31, 58, 0.8) 100%);
    border-bottom: 2px solid rgba(0, 255, 150, 0.2);
    backdrop-filter: blur(10px);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #00ff9f, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
    margin-bottom: 5px;
}

.subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: rgba(150, 180, 255, 0.7);
    letter-spacing: 1px;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: auto;
    scroll-behavior: smooth;
    border-right: 1px solid rgba(0, 255, 159, 0.1);
}

svg {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.skills-container {
    position: relative;
    width: 1000px;
    height: 1400px;
    padding: 40px;
}

.skill-node {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 20;
}

.node-content {
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px solid;
    background: rgba(10, 20, 40, 0.7);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    padding: 10px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Tier Colors */
.tier-0 {
    --color: #00ff9f;
    --glow: rgba(0, 255, 159, 0.5);
}

.tier-1 {
    --color: #00ccff;
    --glow: rgba(0, 204, 255, 0.5);
}

.tier-2 {
    --color: #ff00ff;
    --glow: rgba(255, 0, 255, 0.5);
}

.tier-3 {
    --color: #ffaa00;
    --glow: rgba(255, 170, 0, 0.5);
}

.node-content {
    border-color: var(--color);
    box-shadow: 0 0 15px var(--glow), inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.skill-node:hover .node-content {
    border-color: var(--color);
    box-shadow: 0 0 30px var(--glow), 0 0 60px var(--glow), inset 0 0 15px rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.skill-node:hover .node-content::before {
    opacity: 1;
}

.node-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--color);
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--glow);
}

.node-title {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: rgba(224, 224, 224, 0.9);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.node-level {
    position: absolute;
    top: 5px;
    right: 8px;
    background: var(--color);
    color: #0a0e27;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 0 10px var(--glow);
}

.skill-node.unlocked .node-content {
    background: rgba(10, 20, 40, 0.5);
}

.skill-node.locked .node-content {
    opacity: 0.4;
    border-color: rgba(100, 100, 150, 0.3);
    box-shadow: 0 0 10px rgba(100, 100, 150, 0.2);
}

.skill-node.locked:hover .node-content {
    opacity: 0.6;
}

/* Connection Lines */
line, path {
    stroke-width: 2;
    stroke-opacity: 0.4;
    transition: all 0.3s ease;
}

.connection {
    stroke: #00ccff;
    filter: drop-shadow(0 0 8px rgba(0, 204, 255, 0.5));
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skill-node.active ~ svg .connection[data-to],
.skill-node:hover ~ svg .connection[data-from] {
    stroke-opacity: 1;
    stroke-width: 3;
    filter: drop-shadow(0 0 12px rgba(0, 255, 200, 0.8)) drop-shadow(0 0 4px rgba(0, 255, 200, 0.6));
}

path.connection {
    fill: none;
    stroke-linecap: round;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(10, 20, 40, 0.95);
    border: 1px solid rgba(0, 255, 159, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 12px;
    color: #e0e0e0;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 200px;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.2);
    backdrop-filter: blur(10px);
}

.tooltip.show {
    opacity: 1;
}

.tooltip-title {
    font-family: 'Orbitron', sans-serif;
    color: #00ff9f;
    font-weight: 700;
    margin-bottom: 8px;
}

.tooltip-content {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    line-height: 1.5;
}
/* Status Icons */
.status-icon {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 20px;
    z-index: 25;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.status-icon:hover {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    transform: scale(1.2);
}

.status-icon::before {
    content: '⭕';
}

.status-icon.started::before {
    content: '🔄';
    animation: spin 2s linear infinite;
}

.status-icon.completed::before {
    content: '✅';
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.skill-node.pulse .node-content {
    animation: pulse 2s ease-in-out;
}

/* Narrative Panel */
.narrative-panel {
    width: 380px;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.5), rgba(26, 31, 58, 0.5));
    border-left: 1px solid rgba(0, 255, 159, 0.2);
    padding: 40px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.narrative-panel h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #00ff9f, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.narrative-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(224, 224, 224, 0.85);
}

.narrative-content p {
    margin: 0;
}

.narrative-content h3 {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #00ccff;
    margin: 8px 0 8px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.narrative-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.narrative-content li {
    margin-bottom: 10px;
    padding-left: 0;
}

.tier-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    margin-right: 8px;
    min-width: 50px;
    text-align: center;
}

.tier-badge.tier-0 {
    background: rgba(0, 255, 159, 0.2);
    color: #00ff9f;
    border: 1px solid #00ff9f;
}

.tier-badge.tier-1 {
    background: rgba(0, 204, 255, 0.2);
    color: #00ccff;
    border: 1px solid #00ccff;
}

.tier-badge.tier-2 {
    background: rgba(255, 0, 255, 0.2);
    color: #ff00ff;
    border: 1px solid #ff00ff;
}

.tier-badge.tier-3 {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid #ffaa00;
}

.progress-legend {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 159, 0.15);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.progress-legend div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.progress-icon {
    font-size: 16px;
    min-width: 20px;
}

.narrative-panel::-webkit-scrollbar {
    width: 8px;
}

.narrative-panel::-webkit-scrollbar-track {
    background: rgba(100, 150, 200, 0.05);
}

.narrative-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 204, 255, 0.3);
    border-radius: 4px;
}

.narrative-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 204, 255, 0.6);
}

/* Scrollbar Styling */
.canvas-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.canvas-wrapper::-webkit-scrollbar-track {
    background: rgba(100, 150, 200, 0.1);
}

.canvas-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ff9f, #00ccff);
    border-radius: 10px;
    border: 2px solid rgba(10, 14, 39, 0.8);
}

.canvas-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ccff, #ff00ff);
}
