:root {
    --bg-color: #0f172a;
    --primary-color: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary-color: #10b981;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    /* Animated subtle background gradient */
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
}

#app-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

#network-map {
    flex: 1;
    height: 100%;
    outline: none; /* Remove default focus outline from canvas */
}

/* Glassmorphism Panel */
.glass-panel {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 380px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.details-container {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.instruction {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    margin-top: 3rem;
}

.node-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.node-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.submodule-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.submodule-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.submodule-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.submodule-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 0 15px rgba(59, 130, 246, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Custom Scrollbar for Details Container */
.details-container {
    overflow-y: auto;
    max-height: 400px;
}
.details-container::-webkit-scrollbar {
    width: 6px;
}
.details-container::-webkit-scrollbar-track {
    background: transparent;
}
.details-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.details-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
