:root {
    --bg-dark: #0f172a;
    --primary: #3b82f6;
    --accent: #8b5cf6;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Dynamic Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.5;
    animation: drift 20s infinite alternate linear;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Header */
.glass-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-radius: 30px;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

.glass-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.highlight {
    color: var(--primary);
    font-weight: 800;
}

.search-box input {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    outline: none;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    width: 300px;
    border-color: var(--primary);
    background: rgba(0,0,0,0.4);
}

/* Graph Container */
#graph-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Sidebar */
#sidebar {
    position: absolute;
    right: -400px;
    top: 100px;
    width: 350px;
    height: calc(100vh - 140px);
    border-radius: 24px 0 0 24px;
    z-index: 20;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

#sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--text-main);
}

.sidebar-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin-top: 50px;
}

/* Node Metadata Cards */
.meta-group {
    margin-bottom: 20px;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.meta-value {
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

.pointer-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pointer-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* D3 Graph SVG elements */
.node circle {
    stroke: var(--glass-border);
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.node:hover circle {
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.8));
    stroke: white;
    cursor: pointer;
}

.node text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    fill: var(--text-main);
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.link {
    stroke: rgba(255,255,255,0.15);
    stroke-width: 1.5px;
}
