/* ==========================================================================
   CYBERPUNK NEON BUBBLE PORTAL DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-color: #030308;
  --panel-bg: rgba(6, 6, 14, 0.94);
  --panel-border: rgba(0, 240, 255, 0.4);
  --panel-border-active: rgba(255, 0, 127, 0.8);
  
  /* Cyber Colors */
  --cyber-cyan: #00f0ff;
  --cyber-cyan-rgb: 0, 240, 255;
  --cyber-pink: #ff007f;
  --cyber-pink-rgb: 255, 0, 127;
  --cyber-green: #39ff14;
  --cyber-green-rgb: 57, 255, 20;
  --cyber-yellow: #fefe00;
  --cyber-yellow-rgb: 254, 254, 0;
  --cyber-purple: #bd00ff;
  --cyber-purple-rgb: 189, 0, 255;
  
  --text-primary: #e2e8f0;
  --text-muted: #64748b;
  --glow-intensity: 0 0 15px;
}

/* Base resets & Viewport clamping */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-color);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  user-select: none;
  position: relative;
}

/* Monospace fonts for UI HUD & System configurations */
.hud-header, .cyber-panel, .cyber-btn, .audio-indicator {
  font-family: 'Share Tech Mono', 'Orbitron', monospace;
}

/* ==========================================================================
   SCENIC BACKGROUND & OVERLAYS (Cyberpunk Aesthetics)
   ========================================================================== */

/* Animated Vector Grid */
.cyber-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 60px 60px;
  background-image: 
    linear-gradient(to right, rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  z-index: 1;
  pointer-events: none;
  animation: grid-scroll 24s linear infinite;
  transform: perspective(600px) rotateX(15deg) scale(1.1);
  transform-origin: center bottom;
  opacity: 0.85;
}

@keyframes grid-scroll {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 60px;
  }
}

/* CRT scanlines overlay */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  ), linear-gradient(
    90deg, 
    rgba(255, 0, 0, 0.04), 
    rgba(0, 255, 0, 0.01), 
    rgba(0, 0, 255, 0.04)
  );
  background-size: 100% 4px, 3px 100%;
  z-index: 999;
  pointer-events: none;
  opacity: 0.65;
}

/* Subtle CRT monitor flicker */
.crt-flicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 16, 16, 0.005);
  opacity: 0;
  z-index: 998;
  pointer-events: none;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.27; }
  50% { opacity: 0.35; }
  100% { opacity: 0.27; }
}

/* Holographic edges Vignette */
.vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8), inset 0 0 200px rgba(0, 240, 255, 0.08);
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   HEADER HUD & GLOBAL CONTROLS
   ========================================================================== */

.hud-header {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  pointer-events: none;
}

.header-logo {
  display: flex;
  flex-direction: column;
}

.header-logo .glitch {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--cyber-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  position: relative;
}

.header-logo .sub-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 4px;
}

/* HUD Control Bar container in top-right */
.hud-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

/* Audio toggle HUD element */
.audio-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  background: rgba(10, 10, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.audio-indicator:hover {
  border-color: var(--cyber-cyan);
  color: var(--cyber-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.audio-indicator.audio-on {
  color: var(--cyber-green);
  border-color: var(--cyber-green);
}

.audio-indicator.audio-on .bar {
  background-color: var(--cyber-green);
  animation: sound-wave 1.2s ease infinite alternate;
}

.audio-indicator .bar {
  width: 2px;
  height: 12px;
  background-color: var(--text-muted);
  transition: all 0.3s ease;
}
.audio-indicator .bar:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.audio-indicator .bar:nth-child(3) { height: 10px; animation-delay: 0.4s; }

@keyframes sound-wave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

/* ==========================================================================
   BUBBLE ENTITIES & GLASSMORPHISM PHYSICS DOM NODES
   ========================================================================== */

.bubbles-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none; /* Let pointer events fall through viewport, but enables clicks on children */
}

/* Outer bubble container, absolute position manipulated by JS using translate3d */
.bubble {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto; /* Enable clicks on the individual bubbles */
  will-change: transform;
}

/* Inner styling wrapper to support scaling transitions, rotations, and glows */
.bubble-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-color 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
              background 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: default;
}

/* Reflection gloss effect (matching Win7 screensaver gloss) */
.bubble-inner::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 15%;
  width: 50%;
  height: 25%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 50% 50% 40% 40% / 60% 60% 30% 30%;
  transform: rotate(-15deg);
  pointer-events: none;
}

/* Slightly muted but brighter neon colors (carrying base color tint inside) */
.bubble[data-color="cyan"] .bubble-inner {
  border: 1.5px solid rgba(var(--cyber-cyan-rgb), 0.35);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22) 0%, rgba(var(--cyber-cyan-rgb), 0.08) 45%, rgba(6, 6, 12, 0.5) 85%);
  box-shadow: 
    inset 0 0 16px rgba(var(--cyber-cyan-rgb), 0.25),
    0 0 10px rgba(var(--cyber-cyan-rgb), 0.12);
}
.bubble[data-color="pink"] .bubble-inner {
  border: 1.5px solid rgba(var(--cyber-pink-rgb), 0.35);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22) 0%, rgba(var(--cyber-pink-rgb), 0.08) 45%, rgba(6, 6, 12, 0.5) 85%);
  box-shadow: 
    inset 0 0 16px rgba(var(--cyber-pink-rgb), 0.25),
    0 0 10px rgba(var(--cyber-pink-rgb), 0.12);
}
.bubble[data-color="green"] .bubble-inner {
  border: 1.5px solid rgba(var(--cyber-green-rgb), 0.35);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22) 0%, rgba(var(--cyber-green-rgb), 0.08) 45%, rgba(6, 6, 12, 0.5) 85%);
  box-shadow: 
    inset 0 0 16px rgba(var(--cyber-green-rgb), 0.25),
    0 0 10px rgba(var(--cyber-green-rgb), 0.12);
}
.bubble[data-color="yellow"] .bubble-inner {
  border: 1.5px solid rgba(var(--cyber-yellow-rgb), 0.35);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22) 0%, rgba(var(--cyber-yellow-rgb), 0.08) 45%, rgba(6, 6, 12, 0.5) 85%);
  box-shadow: 
    inset 0 0 16px rgba(var(--cyber-yellow-rgb), 0.25),
    0 0 10px rgba(var(--cyber-yellow-rgb), 0.12);
}
.bubble[data-color="purple"] .bubble-inner {
  border: 1.5px solid rgba(var(--cyber-purple-rgb), 0.35);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22) 0%, rgba(var(--cyber-purple-rgb), 0.08) 45%, rgba(6, 6, 12, 0.5) 85%);
  box-shadow: 
    inset 0 0 16px rgba(var(--cyber-purple-rgb), 0.25),
    0 0 10px rgba(var(--cyber-purple-rgb), 0.12);
}

/* Collision Highlight visual flash effect (instant highlight, slow transition back) */
.bubble.flash .bubble-inner {
  transition: none; /* Make flash instant */
}
.bubble.flash[data-color="cyan"] .bubble-inner {
  border-color: rgba(var(--cyber-cyan-rgb), 1.0);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.5) 0%, rgba(var(--cyber-cyan-rgb), 0.3) 40%, rgba(6, 6, 12, 0.1) 85%);
  box-shadow: inset 0 0 25px rgba(var(--cyber-cyan-rgb), 0.7), 0 0 35px rgba(var(--cyber-cyan-rgb), 0.8);
}
.bubble.flash[data-color="pink"] .bubble-inner {
  border-color: rgba(var(--cyber-pink-rgb), 1.0);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.5) 0%, rgba(var(--cyber-pink-rgb), 0.3) 40%, rgba(6, 6, 12, 0.1) 85%);
  box-shadow: inset 0 0 25px rgba(var(--cyber-pink-rgb), 0.7), 0 0 35px rgba(var(--cyber-pink-rgb), 0.8);
}
.bubble.flash[data-color="green"] .bubble-inner {
  border-color: rgba(var(--cyber-green-rgb), 1.0);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.5) 0%, rgba(var(--cyber-green-rgb), 0.3) 40%, rgba(6, 6, 12, 0.1) 85%);
  box-shadow: inset 0 0 25px rgba(var(--cyber-green-rgb), 0.7), 0 0 35px rgba(var(--cyber-green-rgb), 0.8);
}
.bubble.flash[data-color="yellow"] .bubble-inner {
  border-color: rgba(var(--cyber-yellow-rgb), 1.0);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.5) 0%, rgba(var(--cyber-yellow-rgb), 0.3) 40%, rgba(6, 6, 12, 0.1) 85%);
  box-shadow: inset 0 0 25px rgba(var(--cyber-yellow-rgb), 0.7), 0 0 35px rgba(var(--cyber-yellow-rgb), 0.8);
}
.bubble.flash[data-color="purple"] .bubble-inner {
  border-color: rgba(var(--cyber-purple-rgb), 1.0);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.5) 0%, rgba(var(--cyber-purple-rgb), 0.3) 40%, rgba(6, 6, 12, 0.1) 85%);
  box-shadow: inset 0 0 25px rgba(var(--cyber-purple-rgb), 0.7), 0 0 35px rgba(var(--cyber-purple-rgb), 0.8);
}

/* Interaction Hover State (Link type bubbles only) */
.bubble.type-link {
  cursor: pointer;
}

.bubble.type-link:hover .bubble-inner {
  transform: scale(1.12);
}

.bubble.type-link[data-color="cyan"]:hover .bubble-inner {
  border-color: rgba(var(--cyber-cyan-rgb), 0.95);
  box-shadow: 
    inset 0 0 25px rgba(var(--cyber-cyan-rgb), 0.45),
    0 0 30px rgba(var(--cyber-cyan-rgb), 0.35);
}
.bubble.type-link[data-color="pink"]:hover .bubble-inner {
  border-color: rgba(var(--cyber-pink-rgb), 0.95);
  box-shadow: 
    inset 0 0 25px rgba(var(--cyber-pink-rgb), 0.45),
    0 0 30px rgba(var(--cyber-pink-rgb), 0.35);
}
.bubble.type-link[data-color="green"]:hover .bubble-inner {
  border-color: rgba(var(--cyber-green-rgb), 0.95);
  box-shadow: 
    inset 0 0 25px rgba(var(--cyber-green-rgb), 0.45),
    0 0 30px rgba(var(--cyber-green-rgb), 0.35);
}
.bubble.type-link[data-color="yellow"]:hover .bubble-inner {
  border-color: rgba(var(--cyber-yellow-rgb), 0.95);
  box-shadow: 
    inset 0 0 25px rgba(var(--cyber-yellow-rgb), 0.45),
    0 0 30px rgba(var(--cyber-yellow-rgb), 0.35);
}
.bubble.type-link[data-color="purple"]:hover .bubble-inner {
  border-color: rgba(var(--cyber-purple-rgb), 0.95);
  box-shadow: 
    inset 0 0 25px rgba(var(--cyber-purple-rgb), 0.45),
    0 0 30px rgba(var(--cyber-purple-rgb), 0.35);
}

/* Link Bubble Inner Content Layout */
.bubble-link-anchor {
  text-decoration: none;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border-radius: 50%;
  z-index: 5;
  color: inherit;
}

/* Holographic spinning loading bracket background inside hovered link bubble */
.bubble.type-link:hover::after {
  content: '';
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: cyber-spin 10s linear infinite;
  pointer-events: none;
}

@keyframes cyber-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Inside Bubble Images */
.bubble-image-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.3s ease;
}

.bubble.type-link:hover .bubble-image-wrapper {
  border-color: currentColor;
  transform: scale(1.1);
}

.bubble-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bubble-image-wrapper svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Bubble Text Branding */
.bubble-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 2px;
  color: var(--text-primary);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.bubble[data-color="cyan"] .bubble-label { color: #d6f8ff; }
.bubble[data-color="pink"] .bubble-label { color: #ffd6eb; }
.bubble[data-color="green"] .bubble-label { color: #d6ffd8; }
.bubble[data-color="yellow"] .bubble-label { color: #fffcd6; }
.bubble[data-color="purple"] .bubble-label { color: #f2d6ff; }

/* Subtext URL info on hover inside bubbles */
.bubble-url-hint {
  font-size: 0.55rem;
  color: var(--text-muted);
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.bubble.type-link:hover .bubble-url-hint {
  opacity: 0.85;
  transform: translateY(0);
}

/* Decorative / Ambient Bubbles (Unclickable, quiet styling) */
.bubble.type-ambient {
  opacity: 0.45;
  pointer-events: none; /* Just pass through clicks entirely */
}

/* Collision highlight flash */
.bubble-collision-flash {
  animation: pulse-border 0.3s ease-out;
}

@keyframes pulse-border {
  0% {
    box-shadow: inset 0 0 35px rgba(255, 255, 255, 0.7), 0 0 40px rgba(255, 255, 255, 0.5);
  }
  100% {
    box-shadow: initial;
  }
}

/* ==========================================================================
   CYBERPUNK CONTROL PANEL (HUD CONSOLE)
   ========================================================================== */

/* Toggle System Button styling (reset absolute layout) */
.hud-toggle {
  margin: 0;
}

.cyber-btn {
  position: relative;
  background: rgba(10, 10, 18, 0.85);
  border: 1px solid var(--cyber-cyan);
  color: var(--cyber-cyan);
  padding: 10px 20px;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.cyber-btn:hover {
  background: var(--cyber-cyan);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

.cyber-btn.secondary {
  border-color: var(--cyber-pink);
  color: var(--cyber-pink);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.15);
  clip-path: initial;
  border-radius: 4px;
}

.cyber-btn.secondary:hover {
  background: var(--cyber-pink);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.6);
}

.cyber-btn.tiny {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.neon-green-btn {
  border-color: var(--cyber-green);
  color: var(--cyber-green);
}
.neon-green-btn:hover {
  background-color: var(--cyber-green);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.neon-red-btn {
  border-color: var(--cyber-pink);
  color: var(--cyber-pink);
}
.neon-red-btn:hover {
  background-color: var(--cyber-pink);
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
}

/* Central settings terminal panel */
.cyber-panel {
  position: absolute;
  top: 80px;
  right: 20px;
  width: 420px;
  max-height: calc(100vh - 120px);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.05);
  z-index: 99;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.cyber-panel.collapsed {
  transform: translateX(450px);
  opacity: 0;
  pointer-events: none;
}

.panel-header {
  padding: 15px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 240, 255, 0.04);
}

.panel-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cyber-cyan);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--cyber-cyan);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--cyber-pink);
  text-shadow: 0 0 5px var(--cyber-pink);
}

.panel-content {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Custom Scrollbar for Panel Content */
.panel-content::-webkit-scrollbar {
  width: 4px;
}
.panel-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
.panel-content::-webkit-scrollbar-thumb {
  background: var(--cyber-cyan);
  border-radius: 2px;
}

.panel-footer {
  padding: 10px 15px;
  font-size: 0.65rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
}

/* Inputs and Forms styling */
.cyber-fieldset {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cyber-fieldset legend {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--cyber-pink);
  padding: 0 8px;
  font-weight: bold;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-group label {
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.cyber-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  border-radius: 2px;
  margin: 10px 0;
}

.cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--cyber-cyan);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px var(--cyber-cyan);
  transition: all 0.2s ease;
}

.cyber-slider::-webkit-slider-thumb:hover {
  background: var(--cyber-pink);
  box-shadow: 0 0 12px var(--cyber-pink);
  transform: scale(1.2);
}

.cyber-select, .cyber-input {
  background: rgba(10, 10, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  border-radius: 4px;
  outline: none;
  transition: all 0.3s ease;
}

.cyber-select:focus, .cyber-input:focus {
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* Link configurator grid row */
.links-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.link-item-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.link-item-row:hover {
  background: rgba(0, 240, 255, 0.03);
  border-color: rgba(0, 240, 255, 0.2);
}

.link-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.link-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.link-info .label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.link-info .url {
  font-size: 0.65rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding: 4px 8px;
}

.delete-link-btn:hover {
  color: var(--cyber-pink);
  text-shadow: 0 0 5px var(--cyber-pink);
}

/* Sub-panel form modal for adding/editing links */
.cyber-sub-panel {
  border: 1px solid var(--cyber-pink);
  background: rgba(14, 8, 14, 0.98);
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.25);
  padding: 15px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: all 0.3s ease;
}

.cyber-sub-panel.hidden {
  display: none;
}

.cyber-sub-panel h3 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cyber-pink);
  letter-spacing: 1.5px;
  border-bottom: 1px solid rgba(255, 0, 127, 0.25);
  padding-bottom: 8px;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* ==========================================================================
   GLITCH ANIMATIONS & UTILITIES
   ========================================================================== */

/* Glitch typography */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
}

.glitch::before {
  left: 2px;
  text-shadow: -1px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -1px 0 #00ffe0, 0 1px #00ffe0;
  clip: rect(85px, 450px, 140px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(15px, 9999px, 66px, 0); }
  10% { clip: rect(85px, 9999px, 5px, 0); }
  20% { clip: rect(3px, 9999px, 85px, 0); }
  30% { clip: rect(115px, 9999px, 43px, 0); }
  40% { clip: rect(45px, 9999px, 78px, 0); }
  50% { clip: rect(80px, 9999px, 13px, 0); }
  60% { clip: rect(10px, 9999px, 120px, 0); }
  70% { clip: rect(95px, 9999px, 32px, 0); }
  80% { clip: rect(55px, 9999px, 90px, 0); }
  90% { clip: rect(125px, 9999px, 60px, 0); }
  100% { clip: rect(30px, 9999px, 105px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(70px, 9999px, 105px, 0); }
  10% { clip: rect(120px, 9999px, 45px, 0); }
  20% { clip: rect(35px, 9999px, 80px, 0); }
  30% { clip: rect(5px, 9999px, 125px, 0); }
  40% { clip: rect(90px, 9999px, 15px, 0); }
  50% { clip: rect(130px, 9999px, 95px, 0); }
  60% { clip: rect(65px, 9999px, 30px, 0); }
  70% { clip: rect(15px, 9999px, 110px, 0); }
  80% { clip: rect(115px, 9999px, 55px, 0); }
  90% { clip: rect(40px, 9999px, 85px, 0); }
  100% { clip: rect(100px, 9999px, 120px, 0); }
}
