/* Cybernetic Infrastructure Stylesheet */

:root {
  --bg-primary: #10131a;
  --bg-surface: #1d2026;
  --color-primary: #a4e6ff;
  --color-primary-container: #00d1ff;
  --color-secondary: #ecb2ff;
  --color-secondary-container: #cf5cff;
  --color-tertiary: #00fc92;
  --color-error: #ffb4ab;
}

body {
  background-color: #10131a;
  color: #e1e2eb;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography Helpers */
.font-headline {
  font-family: 'Space Grotesk', sans-serif;
}
.font-mono-data {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism Cards */
.glass-card {
  background-color: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(164, 230, 255, 0.25);
  background-color: rgba(255, 255, 255, 0.04);
}

.glass-card-active {
  position: relative;
  background-color: rgba(255, 255, 255, 0.04);
}

.glass-card-active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(164, 230, 255, 0.7), rgba(236, 178, 255, 0.2), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Neon Top Border */
.neon-border-top {
  position: relative;
}

.neon-border-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #a4e6ff 0%, #ecb2ff 100%);
  opacity: 0.8;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.neon-border-tertiary::before {
  background: linear-gradient(90deg, #00fc92 0%, #a4e6ff 100%);
}

.neon-border-error::before {
  background: linear-gradient(90deg, #ffb4ab 0%, #ff005c 100%);
}

/* Glow Effects */
.glow-primary {
  box-shadow: 0 0 20px rgba(76, 214, 255, 0.25);
}

.glow-primary-lg {
  box-shadow: 0 0 35px rgba(0, 209, 255, 0.35);
}

.glow-text-primary {
  text-shadow: 0 0 14px rgba(164, 230, 255, 0.6);
}

.glow-tertiary {
  box-shadow: 0 0 15px rgba(0, 252, 146, 0.3);
}

.glow-text-tertiary {
  text-shadow: 0 0 12px rgba(0, 252, 146, 0.5);
}

.glow-error {
  box-shadow: 0 0 18px rgba(255, 180, 171, 0.3);
}

.glow-text-error {
  text-shadow: 0 0 12px rgba(255, 180, 171, 0.6);
}

/* Circular Gauge */
.gauge-ring {
  background: conic-gradient(
    from 180deg,
    #00d1ff 0%,
    #a4e6ff calc(var(--gauge-percent, 92) * 1%),
    rgba(164, 230, 255, 0.08) calc(var(--gauge-percent, 92) * 1%),
    rgba(164, 230, 255, 0.08) 100%
  );
  border-radius: 50%;
  position: relative;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gauge-ring.critical {
  background: conic-gradient(
    from 180deg,
    #ff005c 0%,
    #ffb4ab calc(var(--gauge-percent, 92) * 1%),
    rgba(255, 180, 171, 0.08) calc(var(--gauge-percent, 92) * 1%),
    rgba(255, 180, 171, 0.08) 100%
  );
}

.gauge-inner {
  position: absolute;
  inset: 12px;
  background: radial-gradient(circle at center, #191c22 0%, #10131a 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.85);
}

/* Animations */
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.98); }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2.5s infinite ease-in-out;
}

@keyframes spin-once {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-anim {
  animation: spin-once 0.75s ease-in-out;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(16, 19, 26, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(164, 230, 255, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(164, 230, 255, 0.4);
}

/* Nav Active Indicator */
.nav-tab-active {
  color: #a4e6ff !important;
  text-shadow: 0 0 10px rgba(164, 230, 255, 0.5);
  position: relative;
}

.nav-tab-active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #a4e6ff;
  box-shadow: 0 0 8px #a4e6ff;
  border-radius: 2px;
}

/* Material Symbols Styling */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1;
}

/* Modal Backdrop */
.modal-backdrop {
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
}
