/* SSTV Toolkit – minimal overrides (Tailwind CDN handles layout) */

body {
  font-family: 'Inter', system-ui, sans-serif;
}

.mesh-bg {
  background-color: #0a0e1a;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.15), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(6, 182, 212, 0.1), transparent);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card-dark {
  background: rgba(15, 22, 41, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 32px -8px rgba(0, 0, 0, 0.4);
}

.gradient-text {
  display: inline-block;
  line-height: 1.25;
  padding-bottom: 0.12em;
  background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 40%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.input-dark {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.input-dark:focus {
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-dark option {
  background: #0f1629;
  color: #e2e8f0;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: none;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-success:hover:not(:disabled) {
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.tool-btn {
  padding: 0.45rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-btn:hover {
  color: #e2e8f0;
  border-color: rgba(99, 102, 241, 0.4);
}

.tool-btn.bg-indigo-500 {
  background: #6366f1 !important;
  color: #fff !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
}

.code-tag {
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.drop-zone-active {
  border-color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.12) !important;
}

/* Canvas */
.canvas-wrap {
  line-height: 0;
}

canvas {
  display: block;
  cursor: crosshair;
  image-rendering: pixelated;
}

/* Text editor overlay on canvas */
.text-editor-overlay {
  position: absolute;
  z-index: 10;
  min-width: 120px;
  min-height: 28px;
  max-width: 90%;
  background: rgba(10, 14, 26, 0.9);
  border: 2px solid #6366f1;
  border-radius: 6px;
  color: #fff;
  padding: 4px 6px;
  resize: both;
  outline: none;
  font-family: monospace;
  line-height: 1.3;
}

.canvas-wrap {
  position: relative;
}

.reveal-dynamic {
  opacity: 0;
  animation: slideUp 0.45s ease-out forwards;
}

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .animate-slide-up,
  .reveal-dynamic {
    animation: none;
    opacity: 1;
  }
}
