/* ═══════════════════════════════════════════════════════════════
   SoulClaw Workspace Generator — Custom Styles
   Dark neon sci-fi aesthetic
   ═══════════════════════════════════════════════════════════════ */

/* ── GLOBAL ─────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: #0a0a0f;
  color: #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── PAGE FADE-IN ────────────────────────────────────────────── */

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── NEON GLOWS ──────────────────────────────────────────────── */

.glow-blue {
  text-shadow:
    0 0 8px rgba(0, 212, 255, 0.9),
    0 0 20px rgba(0, 212, 255, 0.4),
    0 0 40px rgba(0, 212, 255, 0.15);
}

.glow-green {
  text-shadow:
    0 0 8px rgba(0, 255, 136, 0.9),
    0 0 20px rgba(0, 255, 136, 0.4),
    0 0 40px rgba(0, 255, 136, 0.15);
}

/* ── PROGRESS BAR ────────────────────────────────────────────── */

.progress-bar {
  background: linear-gradient(90deg, #00d4ff 0%, #00ff88 100%);
  box-shadow:
    0 0 10px rgba(0, 212, 255, 0.8),
    0 0 20px rgba(0, 212, 255, 0.3);
  animation: progressPulse 2.5s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.7), 0 0 20px rgba(0, 212, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 16px rgba(0, 212, 255, 1.0), 0 0 30px rgba(0, 255, 136, 0.4);
  }
}

/* ── CARDS ───────────────────────────────────────────────────── */

.card {
  background: #0f0f1a;
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.04), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.28);
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── MODE CARDS (landing page) ───────────────────────────────── */

.mode-card {
  background: #0f0f1a;
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mode-card:hover {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.12);
  transform: translateY(-2px);
}

.mode-card-green {
  border-color: rgba(0, 255, 136, 0.15);
}

.mode-card-green:hover {
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.12);
}

.mode-card-active {
  border-color: #00d4ff;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.18);
}

.mode-card-active-green {
  border-color: #00ff88;
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.18);
}

/* ── TOGGLE BUTTONS ──────────────────────────────────────────── */

.toggle-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 5px;
  border: 1px solid rgba(226, 232, 240, 0.15);
  color: rgba(226, 232, 240, 0.4);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.toggle-btn:hover {
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
}

.toggle-active {
  border-color: #00d4ff !important;
  color: #00d4ff !important;
  background: rgba(0, 212, 255, 0.08) !important;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.15);
}

.toggle-active-green {
  border-color: #00ff88 !important;
  color: #00ff88 !important;
  background: rgba(0, 255, 136, 0.08) !important;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.15);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */

.btn-primary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.6rem 1.4rem;
  border: 1px solid #00d4ff;
  color: #00d4ff;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
}

.btn-primary-lg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.85rem 2.2rem;
  border: 1px solid #00ff88;
  color: #00ff88;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-primary-lg:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.7);
}

.btn-secondary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: #00ff88;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-secondary:hover {
  background: rgba(0, 255, 136, 0.08);
  border-color: #00ff88;
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.3);
}

.btn-ghost {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(226, 232, 240, 0.12);
  color: rgba(226, 232, 240, 0.4);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-ghost:hover {
  border-color: rgba(226, 232, 240, 0.3);
  color: #e2e8f0;
}

.btn-copied {
  border-color: #00ff88 !important;
  color: #00ff88 !important;
  background: rgba(0, 255, 136, 0.08) !important;
}

.btn-generate {
  font-size: 0.85rem;
  padding: 0.7rem 1.6rem;
}

.glow-green-btn {
  border-color: #00ff88 !important;
  color: #00ff88 !important;
}

.glow-green-btn:hover {
  background: rgba(0, 255, 136, 0.1) !important;
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.35) !important;
  color: #fff !important;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.7) !important;
}

/* ── FORM SECTION TITLES ─────────────────────────────────────── */

.form-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.7);
  margin-bottom: 1.25rem;
}

/* ── FIELD GROUPS ────────────────────────────────────────────── */

.field-group {
  margin-bottom: 1.5rem;
}

.field-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.65);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

/* ── TEXT INPUTS ─────────────────────────────────────────────── */

.field-input {
  display: block;
  width: 100%;
  background: #0a0a0f;
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 0.55rem 0.8rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.field-input::placeholder {
  color: rgba(226, 232, 240, 0.2);
}

.field-input:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.12), 0 0 12px rgba(0, 212, 255, 0.08);
}

.field-input.border-red-500 {
  border-color: #f87171 !important;
}

textarea.field-input {
  min-height: 80px;
  resize: vertical;
}

/* ── SELECTS ─────────────────────────────────────────────────── */

.field-select {
  display: block;
  width: 100%;
  background: #0a0a0f;
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 0.55rem 0.8rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.2rem;
}

.field-select:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.12);
}

.field-select option {
  background: #0f0f1a;
  color: #e2e8f0;
}

/* ── RADIO CARDS ─────────────────────────────────────────────── */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 7px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  transition: all 0.18s ease;
  background: transparent;
}

.radio-card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.03);
}

.radio-card:has(input:checked) {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.07);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.12);
}

.radio-card input[type="radio"] {
  accent-color: #00d4ff;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.radio-label {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.75);
  line-height: 1.4;
}

/* ── CHECKBOX CARDS ──────────────────────────────────────────── */

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

@media (min-width: 480px) {
  .checkbox-group {
    grid-template-columns: 1fr 1fr;
  }
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 7px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.checkbox-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.03);
}

.checkbox-card:has(input:checked) {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.07);
}

.checkbox-card input[type="checkbox"] {
  accent-color: #00d4ff;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.35;
}

/* ── CONDITIONAL FIELDS ──────────────────────────────────────── */

.conditional-field {
  display: none;
  overflow: hidden;
  animation: slideDown 0.25s ease-out;
}

.conditional-field.shown {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── EMOJI GRID ──────────────────────────────────────────────── */

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .emoji-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.emoji-btn {
  font-size: 1.35rem;
  padding: 0.45rem;
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-btn:hover {
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.06);
  transform: scale(1.1);
}

.emoji-selected {
  border-color: #00d4ff !important;
  background: rgba(0, 212, 255, 0.12) !important;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
  transform: scale(1.08);
}

/* ── VALIDATION ERRORS ───────────────────────────────────────── */

.field-error {
  color: #f87171;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.35rem;
}

/* ── MARKDOWN OUTPUT (result page) ──────────────────────────── */

.hljs {
  background: transparent !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.65;
}

pre {
  margin: 0;
}

/* ── SCROLLBAR ───────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.25);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* ── PULSE ANIMATION FOR LANDING EMOJI ──────────────────────── */

@keyframes pulseSlow {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

.animate-pulse-slow {
  animation: pulseSlow 3s ease-in-out infinite;
}

/* ── RESPONSIVE TWEAKS ───────────────────────────────────────── */

@media (max-width: 480px) {
  .radio-group {
    gap: 0.4rem;
  }
  .radio-card {
    padding: 0.55rem 0.7rem;
  }
  .emoji-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 0.35rem;
  }
  .emoji-btn {
    font-size: 1.1rem;
    padding: 0.35rem;
  }
}

/* ── BACKGROUND CANVAS ───────────────────────────────────────── */

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── BACKGROUND ORBS ─────────────────────────────────────────── */

.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.bg-orb-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.18) 0%, transparent 70%);
  top: -280px;
  left: -180px;
  animation: orbFloat1 22s ease-in-out infinite;
}

.bg-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.14) 0%, transparent 70%);
  bottom: -150px;
  right: -120px;
  animation: orbFloat2 28s ease-in-out infinite;
}

.bg-orb-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(123, 94, 167, 0.12) 0%, transparent 70%);
  top: 40%;
  left: 55%;
  animation: orbFloat3 35s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, 60px) scale(1.05); }
  66%       { transform: translate(-30px, 30px) scale(0.97); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-50px, -40px) scale(1.08); }
  70%       { transform: translate(25px, -20px) scale(0.95); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(-60px, 40px) scale(1.1); }
  75%       { transform: translate(40px, -50px) scale(0.92); }
}

/* ── LANGUAGE TOGGLE BUTTONS ─────────────────────────────────── */

.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(226, 232, 240, 0.15);
  border-radius: 4px;
  color: rgba(226, 232, 240, 0.35);
  background: transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lang-btn:hover {
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
}

.lang-btn-active {
  border-color: rgba(0, 212, 255, 0.6) !important;
  color: #00d4ff !important;
  background: rgba(0, 212, 255, 0.08) !important;
}

/* ── GENERATING / LOADING OVERLAY ────────────────────────────── */

#generating-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0a0a0f;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease;
}

#generating-overlay.active {
  display: flex;
}

.generating-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-top-color: #00d4ff;
  animation: spin 1s linear infinite;
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.3),
    0 0 60px rgba(0, 212, 255, 0.1),
    inset 0 0 20px rgba(0, 212, 255, 0.05);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.generating-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: rgba(0, 212, 255, 0.8);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.generating-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%  { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}
