:root {
    /* Atlas palette - cartography and structure */
    --map-darkest: #0a0f14;
    --map-dark: #101820;
    --map-mid: #1a2633;
    --map-accent: #2a4a6a;
    --map-bright: #4a8ac0;
    --map-glow: #6ab0e0;
    --metal-dark: #0d1117;
    --metal-mid: #161b22;
    --metal-light: #21262d;
    --metal-bright: #8b949e;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-dim: #484f58;
    --status-online: #3fb950;
    --status-building: #d29922;
    --status-offline: #f85149;
    --risk-critical: #f85149;
    --risk-warning: #d29922;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--map-darkest);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background map grid effect */
.map-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(74, 138, 192, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 138, 192, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    position: relative;
}

.emblem {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.name {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 200;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 40px rgba(74, 138, 192, 0.3);
}

.tagline {
    font-size: 1rem;
    color: var(--map-glow);
    font-weight: 300;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.map-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--map-bright), transparent);
    margin: 2rem auto 0;
    opacity: 0.6;
}

/* Panel Styling */
.panel {
    background: var(--metal-dark);
    border: 1px solid var(--metal-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.panel:hover {
    border-color: var(--map-accent);
}

.panel h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

/* Status Panel */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.map-building {
    color: var(--map-glow);
    animation: pulse 2s ease-in-out infinite;
}

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

.risk-indicator {
    color: var(--risk-critical);
}

/* Network Panel */
.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.agent-node {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--metal-mid);
    border-radius: 8px;
    border-left: 3px solid var(--metal-light);
    transition: all 0.3s ease;
}

.agent-node:hover {
    border-left-color: var(--map-bright);
    background: linear-gradient(90deg, rgba(74, 138, 192, 0.1), transparent);
}

.node-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.node-indicator.online {
    background: var(--status-online);
    box-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
}

.node-indicator.building {
    background: var(--status-building);
    box-shadow: 0 0 6px rgba(210, 153, 34, 0.4);
    animation: build-pulse 2s ease-in-out infinite;
}

.node-indicator.offline {
    background: var(--status-offline);
}

@keyframes build-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.node-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.node-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.node-domain {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: 'SF Mono', Monaco, monospace;
}

.node-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Role Panel */
.role-grid {
    display: grid;
    gap: 1rem;
}

.role-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--metal-mid);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.role-item:hover {
    background: linear-gradient(90deg, rgba(74, 138, 192, 0.08), transparent);
}

.role-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.role-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.role-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Changelog Panel */
.version-badge {
    display: inline-block;
    background: var(--map-accent);
    color: var(--text-primary);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
}

.changelog-entries {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.entry {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.entry time {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: 'SF Mono', Monaco, monospace;
    white-space: nowrap;
    min-width: 100px;
}

.entry-content {
    flex: 1;
    min-width: 250px;
}

.entry-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.entry-content ul {
    list-style: none;
    padding-left: 0;
}

.entry-content li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.entry-content li::before {
    content: '→';
    position: absolute;
    left: 0.15rem;
    color: var(--map-bright);
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--metal-mid);
    text-align: center;
}

.forge-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.forge-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.forge-links a:hover {
    color: var(--map-glow);
}

.forge-tag {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .name {
        letter-spacing: 0.2em;
    }
    
    .panel {
        padding: 1rem;
    }
    
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .entry {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .forge-links {
        gap: 1rem;
    }
}

/* Selection styling */
::selection {
    background: var(--map-accent);
    color: var(--text-primary);
}