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

html, body {
  height: 100%;
  background: #0e0e0e;
  overflow: hidden;
}

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

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #0e0e0e;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #262626;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #484847;
}

/* Terminal cursor blink animation */
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background-color: #8eff71;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Terminal container styling */
#terminal {
  width: 100%;
  height: 100%;
  padding: 8px;
  background: #000000;
}

/* xterm.js customizations */
.xterm {
  padding: 8px;
}

.xterm-viewport::-webkit-scrollbar {
  width: 4px;
}

.xterm-viewport::-webkit-scrollbar-track {
  background: #0e0e0e;
}

.xterm-viewport::-webkit-scrollbar-thumb {
  background: #262626;
}

/* Sidebar collapsed state */
#sidebar.collapsed {
  width: 0;
  overflow: hidden;
}

#sidebar.collapsed + #main-content,
#main-content.sidebar-collapsed {
  margin-left: 0;
}

/* Navigation item active state */
.nav-item.active {
  border-left: 2px solid #8eff71;
  background: rgba(38, 38, 38, 0.2);
  color: #8eff71;
}

.nav-item:not(.active) {
  border-left: 2px solid transparent;
}

/* Code styling */
code {
  font-family: 'JetBrains Mono', monospace;
}

/* Focus states */
button:focus-visible {
  outline: 2px solid #8eff71;
  outline-offset: 2px;
}

/* Selection styling */
::selection {
  background: #8eff71;
  color: #0d6100;
}

/* Glow effects */
.glow-primary {
  box-shadow: 0 0 8px rgba(142, 255, 113, 0.5);
}

.crt-glow {
  text-shadow: 0 0 8px rgba(142, 255, 113, 0.6);
}

.cyan-glow:focus {
  box-shadow: 0 0 15px rgba(23, 238, 250, 0.3);
  border-color: #17eefa !important;
}

.primary-glow:hover {
  box-shadow: 0 0 20px rgba(142, 255, 113, 0.4);
}

/* Leads Modal */
#leads-modal {
  transition: opacity 0.2s ease-out;
}

#leads-modal.hidden {
  display: none;
}

/* Event Overlay Styles */
#event-overlay {
  transition: opacity 0.2s ease-out;
}

#event-overlay[data-type="error"] {
  border-color: #ff7351;
}

#event-overlay[data-type="error"] #event-overlay-inner {
  background: rgba(255, 115, 81, 0.1);
}

#event-overlay[data-type="error"] #event-overlay-accent {
  background: #ff7351;
}

#event-overlay[data-type="error"] #event-overlay-icon,
#event-overlay[data-type="error"] #event-overlay-title {
  color: #ff7351;
}

#event-overlay[data-type="error"] #event-overlay-code {
  color: rgba(255, 115, 81, 0.5);
}

#event-overlay[data-type="success"] {
  border-color: #8eff71;
}

#event-overlay[data-type="success"] #event-overlay-inner {
  background: rgba(142, 255, 113, 0.1);
}

#event-overlay[data-type="success"] #event-overlay-accent {
  background: #8eff71;
}

#event-overlay[data-type="success"] #event-overlay-icon,
#event-overlay[data-type="success"] #event-overlay-title {
  color: #8eff71;
}

#event-overlay[data-type="success"] #event-overlay-code {
  color: rgba(142, 255, 113, 0.5);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #main-content {
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  main {
    flex-direction: column;
  }

  main > section:first-child {
    width: 100%;
    min-width: unset;
    max-height: 40vh;
  }
}
