/* COTSpotter Survey Viewer - Dark Theme with Neon Accents */

:root {
  /* Background colors */
  --bg-dark: #0a0e14;
  --bg-panel: rgba(15, 23, 42, 0.85);
  --bg-panel-solid: #0f1729;
  --bg-input: #1a2332;

  /* Border and divider colors */
  --border-color: rgba(45, 74, 111, 0.5);
  --border-color-focus: #00b4d8;

  /* Accent colors */
  --cyan-glow: #00b4d8;
  --red-glow: #ef4444;
  --green-glow: #22c55e;
  --yellow-glow: #ffff00;
  --gray-default: #9ca3af;

  /* Text colors */
  --text-primary: #e2e8f0;
  --text-secondary: #8899aa;
  --text-muted: #64748b;

  /* Depth profile colors */
  --depth-water: rgba(0, 180, 216, 0.35);
  --depth-seafloor: rgba(139, 101, 65, 0.7);
  --depth-camera: #ffff00;
  --depth-position: #00ff00;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Panel styles */
.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.1);
}

/* Button styles */
.btn {
  background: transparent;
  border: 2px solid var(--cyan-glow);
  color: var(--cyan-glow);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--cyan-glow);
  color: var(--bg-dark);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--gray-default);
  color: var(--gray-default);
}

.btn:disabled:hover {
  background: transparent;
  box-shadow: none;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

/* Icon button */
.icon-btn {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 6px;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(0, 180, 216, 0.7);
}

/* Input styles */
input[type="text"],
input[type="number"],
select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--border-color-focus);
}

/* Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan-glow);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 180, 216, 0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan-glow);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(0, 180, 216, 0.5);
}

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 0 40px rgba(0, 180, 216, 0.3);
}

.modal-image {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}

/* Detection marker colors */
.detection-valid {
  color: var(--green-glow);
  stroke: var(--green-glow);
}

.detection-invalid {
  color: var(--red-glow);
  stroke: var(--red-glow);
}

.detection-pending {
  color: var(--gray-default);
  stroke: var(--gray-default);
}

/* Pulse animation for markers */
@keyframes pulse {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Loading spinner */
.spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--cyan-glow);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

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

/* Utility classes */
.text-muted {
  color: var(--text-secondary);
}

.text-error {
  color: var(--red-glow);
}

.text-success {
  color: var(--green-glow);
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-4 {
  gap: 16px;
}

.p-2 {
  padding: 8px;
}

.p-4 {
  padding: 16px;
}

.mt-2 {
  margin-top: 8px;
}

.mb-2 {
  margin-bottom: 8px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-panel);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-glow);
}
