:root {
    --bg: #000000;
    --border: #1a1a1a;
    --accent: #FFFFFF;
    --text-muted: #666666;
    --grey-border: #444444;
    --font-mono: 'JetBrains Mono', monospace;
    --system-ready: #00FF88;
    --box-bg: #0a0a0a;
}

[data-theme="light"] {
    --bg: #FFFFFF;
    --border: #E5E5E5;
    --accent: #000000;
    --text-muted: #888888;
    --grey-border: #CCCCCC;
    --box-bg: #f9f9f9;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body { background: var(--bg); color: var(--accent); font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* Navbar */
.navbar-primary { height: 70px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; }
.brand-block { display: flex; align-items: center; gap: 14px; }
.nav-logo { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name-mini { font-weight: 800; font-size: 14px; letter-spacing: 1px; }
.brand-tagline-mini { font-size: 8px; color: var(--text-muted); }
.theme-btn-nav { background: transparent; border: 1px solid var(--border); color: var(--accent); width: 34px; height: 34px; border-radius: 4px; cursor: pointer; }

/* Main Container */
.utility-center { flex: 1; max-width: 580px; margin: 40px auto; width: 100%; padding: 0 1.5rem; }
.monolithic-card { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 30px; }
.input-container { display: flex; align-items: center; padding: 12px; gap: 12px; }

.mono-prefix { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent); flex-shrink: 0; letter-spacing: 0.5px; }
input { flex: 1; background: transparent; border: none; color: var(--accent); font-family: var(--font-mono); font-size: 11px; min-width: 0; }
input::placeholder { color: var(--text-muted); font-size: 10px; text-transform: uppercase; }

.primary-btn { 
    background: var(--accent); color: var(--bg); border: none; 
    padding: 10px 20px; font-family: var(--font-mono); font-weight: 700; 
    font-size: 11px; border-radius: 2px; cursor: pointer; flex-shrink: 0; transition: 0.2s;
}
.primary-btn:hover { opacity: 0.9; }

.action-footer { border-top: 1px solid var(--border); padding: 8px 12px; display: flex; justify-content: flex-end; }

/* Shared Button Styles */
.secondary-btn-small, .secondary-btn-small-id { 
    background: transparent; border: none; color: var(--text-muted); 
    font-size: 10px; font-weight: 700; cursor: pointer; 
    transition: 0.2s; letter-spacing: 1px; 
}
.secondary-btn-small:hover, .secondary-btn-small-id:hover { color: var(--accent); }

/* Refined Labels */
.section-label-refined { font-size: 9px; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }

/* Profile Hero */
.profile-hero-vertical { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; }
.avatar-void-rounded { width: 110px; height: 110px; border: 2px solid var(--grey-border); border-radius: 50%; overflow: hidden; margin: 20px 0; cursor: pointer; }
.avatar-void-rounded img { width: 100%; height: 100%; object-fit: cover; }
.handle-wrapper { display: flex; align-items: center; gap: 6px; margin-bottom: 15px; }
#u-handle { font-size: 14px; font-weight: 500; }
.v-badge { width: 15px; height: 15px; }
#u-bio { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 80%; margin: 0 auto 15px; }
.view-link { color: var(--accent); font-size: 9px; text-decoration: none; border: 1px solid var(--border); padding: 8px 16px; border-radius: 2px; transition: 0.2s; font-weight: 700; }
.view-link:hover { background: var(--accent); color: var(--bg); }

/* Metadata */
.meta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.pill { border: 1px solid var(--border); padding: 6px 14px; border-radius: 4px; font-size: 10px; color: var(--text-muted); }

/* Map */
.map-view-container { border: 1px solid var(--border); border-radius: 4px; padding: 15px; margin-bottom: 30px; background: rgba(255,255,255,0.01); }
.map-header { font-size: 9px; color: var(--text-muted); margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.cool-map-surface { width: 100%; height: 260px; position: relative; overflow: hidden; background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%); }
#world-map-wrapper svg { width: 100%; height: 100%; fill: var(--bg); stroke: var(--border); stroke-width: 0.5px; }
.country-active { fill: var(--accent) !important; opacity: 0.2; stroke: var(--accent) !important; stroke-width: 1.5px !important; animation: mapPulse 3s infinite ease-in-out; }
@keyframes mapPulse { 0%, 100% { opacity: 0.1; } 50% { opacity: 0.3; } }
#active-country-label { text-align: center; font-size: 10px; margin-top: 10px; color: var(--text-muted); letter-spacing: 1px; }

/* Statistics */
.stats-section { margin-bottom: 25px; }
.cyber-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cyber-stat { border: 1px solid var(--border); padding: 20px; border-radius: 2px; display: flex; flex-direction: column; background: var(--box-bg); }
.cy-lab { color: var(--text-muted); font-size: 10px; font-weight: 600; margin-bottom: 8px; letter-spacing: 0.5px; }
.cy-val { font-size: 22px; font-weight: 800; font-family: var(--font-mono); }
.cy-bar { height: 1px; width: 100%; background: var(--border); margin-top: 12px; position: relative; }
.cy-progress { height: 100%; width: 30%; background: var(--accent); position: absolute; left: 0; top: 0; }
.full-width { grid-column: span 2; }

/* System Grid Design */
.system-grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; border-top: 1px solid var(--border); padding-top: 15px; }
.sys-item { display: flex; flex-direction: column; gap: 8px; }
.full-width-box { grid-column: span 2; }

/* Logic Grouping for IDs */
.boxed-sys-group { 
    border: 1px solid var(--border); 
    background: var(--box-bg); 
    border-radius: 2px; 
    overflow: hidden; 
}
.boxed-sys-group .sys-key { padding: 12px 12px 4px 12px; }
.sys-value-field-flat { 
    padding: 0 12px 12px 12px; 
    font-size: 12px; 
    color: var(--accent); 
    cursor: pointer;
}
.sys-action-row { 
    border-top: 1px solid var(--border); 
    padding: 8px 12px; 
    display: flex; 
    justify-content: flex-end; 
    background: rgba(255,255,255,0.01);
}

.split-box, .boxed-created { background: var(--box-bg); padding: 12px; border: 1px solid var(--border); border-radius: 2px; }
.sys-key { font-size: 9px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.sys-data-label { font-size: 12px; font-weight: 800; color: var(--accent); margin-top: 2px; }

.truncate-id { 
    display: inline-block; 
    max-width: 280px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.export-btn-mono { width: 100%; background: transparent; border: 1px solid var(--border); color: var(--accent); padding: 15px; margin: 30px 0; cursor: pointer; font-size: 11px; font-weight: 700; border-radius: 4px; transition: 0.2s; }
.export-btn-mono:hover { background: var(--accent); color: var(--bg); }

/* Footer */
.status-footer { border-top: 1px solid var(--border); height: 60px; display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; font-size: 10px; }
.pulse-dot { width: 6px; height: 6px; background: var(--system-ready); border-radius: 50%; display: inline-block; margin-right: 8px; animation: pulse 2s infinite; }
.dev-link { color: var(--accent) !important; text-decoration: none; font-weight: 700; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mono { font-family: var(--font-mono); }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease-out; }

/* Skeleton */
.skeleton { background: #111; border-radius: 2px; margin-bottom: 10px; }
.skeleton-avatar { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto; }
.skeleton-text { height: 15px; width: 50%; margin: 10px auto; }
.skeleton-rect { height: 150px; width: 100%; }
