/* Base & Typography */
body {
  background-color: #080E1A;
  background-image: 
    radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0B1120;
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Category Card */
.cat-card {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 158, 11, 0.3);
}

/* Idea Tool Cards */
.idea-card {
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, border-color 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.idea-card:hover {
  transform: translateY(-3px) scale(1.02);
}
.idea-card:active {
  transform: scale(0.96);
}
.idea-card.selected {
  border-color: #F59E0B;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(124, 58, 237, 0.2));
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

/* Forge Slots */
.forge-slot {
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.forge-slot.filled {
  border-style: solid;
  border-color: rgba(245, 158, 11, 0.6);
  background: linear-gradient(145deg, #162238, #10192A);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.forge-slot.filled:hover {
  border-color: #F43F5E;
}

/* Constraint & Hazard Badges */
.constraint-tag {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #FDA4AF;
}
.trap-tag {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FCD34D;
}

/* Mode Switcher Buttons */
.mode-toggle-btn.active {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0F172A;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}
.mode-toggle-btn:not(.active) {
  background: rgba(15, 23, 42, 0.8);
  color: #94A3B8;
  border: 1px solid rgba(51, 65, 85, 0.6);
}

/* Speech Bubble Tail */
.comic-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 28px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #0F172A;
}

/* Micro Animations */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* Touch optimisations */
button, .idea-card, .cat-card {
  touch-action: manipulation;
}