@import url('https://fonts.googleapis.com/css2?family=Monoton&family=Orbitron:wght@400..900&family=Share+Tech&family=Share+Tech+Mono&family=Space+Grotesk:wght@300..700&family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    /* Palette */
    --sky-blue: #00B4D8;
    --paradise-blue:#27D6F5;
    --royal-purple: #7209B7;
    --gold: #FFD700;
    --orange: #FB923C;
    --grass-green: #03911b; /* Adjusted for neon feel */
    --dark-bg: #0a0a12;
    --panel-bg: rgba(20, 20, 30, 0.7);
    --slate-gray: #777777;
    --text-main: #e0e0e0;
    --stroke-color: #000000;
    --mobile-menu-orange:#F54927;  
   --link-gold:#ffae00;
   --hover-link-purple:#6d19db;
    
    /* Fonts */
    --font-head: 'Orbitron', sans-serif;
    --font-tech: 'Share Tech Mono', monospace;
    --font-body: 'Roboto Mono', monospace;
}

body.light-mode {
    --dark-bg: #f0f2f5;
    --panel-bg: rgba(255, 255, 255, 0.8);
    --text-main: #1a1a2e;
    --stroke-color: #ffffff;
}

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

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    transition: background 0.5s ease;
    scroll-behavior: smooth;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--orange), var(--royal-purple));
    border: 2px solid var(--stroke-color);
    border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover {
    background: var(--royal-purple);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* unvisited link */
a:link {
  color: var(--link-gold);
}

/* visited link */
a:visited {
  color: var(--hover-link-purple);
}

/* mouse over link */
a:hover {
  color: var(--paradise-blue);
}

/* selected link */
a:active {
  color: var(--slate-gray);
}

.nav-links {
    color: var(--link-gold);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

.nav-links:active {
    color: var(--gold);
    text-shadow: 0 0 8px var(--slate-gray);
}

/* --- Utilities --- */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: 2px solid var(--royal-purple);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    padding: 15px;
    margin: 10px;
    position: relative;
    overflow: hidden;
}

.highlight { color: var(--sky-blue); }

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0,0,0,0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--gold);
}

.logo { font-family: var(--font-head); font-size: 1.5rem; font-weight: bold; letter-spacing: 2px; }

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 15px;
    font-family: var(--font-tech);
    text-transform: uppercase;
    transition: color 0.3s;
}

nav a:hover { color: var(--sky-blue); text-shadow: 0 0 8px var(--sky-blue); }

.header-controls button {
    background: none;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 10px;
}

/* --- Maps --- */
.map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.map-frame {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.map-frame h3 { font-family: var(--font-head); margin-bottom: 10px; color: var(--grass-green); }

iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
    background: #000;
}

/* --- Charts --- */
.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px;
    padding: 15px;
}

select, button {
    background: #222;
    color: var(--sky-blue);
    border: 1px solid var(--sky-blue);
    padding: 8px 15px;
    font-family: var(--font-tech);
    cursor: pointer;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}
 /*Leaflet*/
/* Force height on your custom map divs */
#map-abuse, #map-fortinet {
    height: 450px !important; /* Explicit pixel height is safest */
    width: 100%;
    display: block;
    background: #0b0b14;
    border: 1px solid #333;
    z-index: 1;
}

/* Force height on the internal Leaflet container */
.leaflet-container {
    height: 100% !important;
    width: 100% !important;
    z-index: 1;
}

/* Ensure parent grid items have height too */
.map-frame {
    height: 500px !important; /* Must be larger than map content */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}   

.chart-frame { height: 400px; position: relative; }

/* --- Vulnerabilities --- */
.vuln-container { margin: 20px; padding: 20px; }
.stats-row { display: flex; gap: 20px; margin-bottom: 20px; }
.metric-tile { 
    background: rgba(0,0,0,0.3); 
    padding: 15px; 
    border-left: 4px solid var(--orange); 
    min-width: 150px;
}

table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
th { background: rgba(114, 9, 183, 0.3); color: var(--gold); font-family: var(--font-head); }
tr:hover { background: rgba(255,255,255,0.05); }

/* --- News & Sidebar --- */
.news-layout { display: flex; position: relative; margin: 20px; }
.news-feed { flex: 1; padding: 20px; }
#news-sidebar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 250px;
    height: 300px;
    transform: translateX(-120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 900;
}
#news-sidebar.open { transform: translateX(0); }
.sidebar-toggle {
    position: absolute;
    left: 100px;
    bottom: -70px;
    background: var(--orange);
    border:1px solid var(--dark-bg);
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    z-index: 901;
}
.fa-chevron-left:hover { 
    color:black;
    padding:4px;
    background: var(--gold);
}

.refresh-btn:hover {
    color:black;
    border:1px solid var(--dark-bg);
    background: var(--gold);
}

#news-sidebar ul { list-style: none; }
#news-sidebar li { margin: 10px 0; }
#news-sidebar a { color: var(--sky-blue); text-decoration: none; }

/* --- Audio Widget --- */
#audio-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 260px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.gsap-control-panel {
    width: 100%;
    display: grid;
    gap: 10px;
    padding: 10px 0 0;
}
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-family: var(--font-tech);
    color: var(--text-main);
}
.toggle-title {
    font-size: 0.82rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.toggle-track {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid var(--stroke-color);
    position: relative;
    transition: background 0.3s ease;
}
.toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--orange);
    position: absolute;
    left: 3px;
    top: 3px;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, background 0.3s ease;
}
.toggle-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-label input:checked + .toggle-track .toggle-thumb {
    transform: translateX(22px);
    background: var(--royal-purple);
}
.superhero-toggle img.hero-icon {
    width: 66px;
    height: 66px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.2);
}
#volume-slider {
    z-index: 100000;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--stroke-color);
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
}
#volume-slider:hover {
    background: rgba(114, 9, 183, 0.18);
}
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--gold));
    border: 2px solid var(--stroke-color);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.18);
}
#volume-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--gold));
    border: 2px solid var(--stroke-color);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.18);
}
.spectrum-container { width:100%; display: flex; gap: 3px; height: 30px; align-items: flex-end; justify-content: center; margin: 10px 0; }
.bar { flex: 1 0 12px; min-width: 12px; max-width: 22px; border:1px solid rgb(0, 0, 0); background: var(--gold); animation: bounce 1s infinite;  }

/* Compact hamburger button for mobile audio widget */
.audio-hamburger {
    display: flex;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: none;
    background: var(--royal-purple);
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 8px;
}

#audio-widget {
    transition: width 0.25s ease, height 0.25s ease, padding 0.25s ease;
}

/* Collapse behavior: when `.collapsed` is present hide non-hamburger controls */
#audio-widget.collapsed .gsap-control-panel,
#audio-widget.collapsed .spectrum-container {
    display: none !important;
}
#audio-widget.collapsed .audio-controls > *:not(.audio-hamburger) {
    display: none !important;
}

/* On small screens, collapsed widget becomes a fixed compact button */
@media (max-width: 768px) {
    #audio-widget.collapsed {
        width: 56px;
        height: 56px;
        padding: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible;
    }
}
@keyframes bounce { 0%, 100% { height: 5px; } 50% { height: 25px; } }
.paused .bar { animation: none; height: 5px; }
.audio-controls { display: flex; gap: 10px; align-items: center; width: 100%; }

/* --- Footer --- */
footer {
    text-align: center;
    padding: 30px;
    background: rgba(0,0,0,0.9);
    border-top: 1px solid var(--grass-green);
    margin-top: 50px;
}
.footer-links a { color: var(--text-main); margin: 0 10px; text-decoration: none; }
.footer-links a:hover { color: var(--gold); }

/* --- Mobile --- */

#mobile-menu {
  font-family: "Space Grotesk", sans-serif, "Share Tech Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 1px;
  /* color:var(--paradise-blue); */
}

#mobile-menu a {
  color: var(--link-gold);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}
#mobile-menu a:hover {
  color: var(--hover-link-purple);
  text-shadow: 0 0 8px var(--hover-link-purple);
}


.mobile-overlay {
    position: fixed; top: 70px; left: 0; width: 100%;
    background: rgba(0,0,0,0.95);
    display: flex; flex-direction: column; align-items: center;
    padding: 20px;
    transform: translateY(-150%);
    transition: transform 0.3s;
    z-index: 999;
}
.mobile-overlay.active { transform: translateY(0); }
.mobile-overlay a { margin: 15px 0; font-size: 1.2rem; }

@media (max-width: 768px) {
    .map-grid, .charts-grid { grid-template-columns: 1fr; }
    nav { display: none; }
    #hamburger { display: block; }
}   