/* BotWick.com - Context Graph Styles */

:root {
    --bg-dark: #0d1117;
    --bg-panel: #161b22;
    --bg-card: #21262d;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    /* Node colors */
    --color-self: #f0883e;
    --color-person: #a371f7;
    --color-tool: #58a6ff;
    --color-concept: #3fb950;
    --color-project: #f778ba;
    --color-process: #79c0ff;
    
    /* Edge colors */
    --edge-default: #30363d;
    --edge-highlight: #58a6ff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* Identity Panel */
.identity-panel {
    width: 280px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.identity-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.identity-header .emoji {
    font-size: 48px;
    filter: drop-shadow(0 0 10px rgba(240, 136, 62, 0.3));
}

.identity-name h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.identity-name .creature {
    color: var(--text-secondary);
    font-size: 14px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.active {
    background: #3fb950;
    box-shadow: 0 0 8px rgba(63, 185, 80, 0.5);
    animation: pulse 2s infinite;
}

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

.vibe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
}

.info-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.info-section ul {
    list-style: none;
}

.info-section li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-left: 2px solid var(--border);
    padding-left: 12px;
    margin-bottom: 4px;
}

/* Legend */
.legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.self { background: var(--color-self); }
.legend-dot.person { background: var(--color-person); }
.legend-dot.tool { background: var(--color-tool); }
.legend-dot.concept { background: var(--color-concept); }
.legend-dot.project { background: var(--color-project); }
.legend-dot.process { background: var(--color-process); }

.footer {
    margin-top: auto;
    color: var(--text-muted);
    font-size: 12px;
}

/* Graph Area */
.graph-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#graph {
    width: 100%;
    height: 100%;
}

#graph svg {
    width: 100%;
    height: 100%;
}

/* Graph Nodes */
.node {
    cursor: pointer;
    transition: filter 0.2s;
}

.node:hover {
    filter: brightness(1.2);
}

.node circle {
    stroke: var(--bg-dark);
    stroke-width: 2px;
}

.node text {
    font-size: 11px;
    fill: var(--text-primary);
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: central;
    font-weight: 500;
}

/* Graph Edges */
.edge {
    stroke: var(--edge-default);
    stroke-opacity: 0.6;
    fill: none;
}

.edge.highlighted {
    stroke: var(--edge-highlight);
    stroke-opacity: 1;
    stroke-width: 2px;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    max-width: 250px;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tooltip.hidden {
    display: none;
}

.tooltip h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.tooltip p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .identity-panel {
        width: 100%;
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .graph-area {
        height: calc(100vh - 200px);
    }
}
