/* ==========================================================================
   DEBUG & TESTING SUITE STYLES
   Rich Glassmorphism Dark Theme with Vibrant Accents
   ========================================================================== */

.btn-header-debug {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn-header-debug:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.7);
  border-color: #fff;
}

/* Floating Quick Trigger Pill */
.debug-floating-trigger {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 999;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 9999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(168, 85, 247, 0.3);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.debug-floating-trigger:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(30, 41, 59, 0.95);
  border-color: #c084fc;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(192, 132, 252, 0.5);
}

.debug-floating-trigger .debug-hotkey {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}

/* Debug Modal Container */
.debug-modal-card {
  width: 92vw;
  max-width: 1060px;
  max-height: 88vh;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(147, 51, 234, 0.5);
  border-radius: 20px;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(147, 51, 234, 0.25);
  overflow: hidden;
  animation: debugModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes debugModalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Debug Header */
.debug-header {
  padding: 16px 24px;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.5) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.debug-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.debug-title-wrap h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.debug-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.5);
  padding: 3px 8px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
}

/* Nav Tabs */
.debug-tabs-bar {
  display: flex;
  gap: 6px;
  padding: 10px 24px;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.debug-tab-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.debug-tab-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
}

.debug-tab-btn.active {
  background: linear-gradient(135deg, #7e22ce 0%, #9333ea 100%);
  color: #fff;
  border-color: #c084fc;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.35);
}

/* Tab Content Area */
.debug-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sections & Cards */
.debug-section {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debug-section-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.debug-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.debug-btn-grid-lg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

/* Debug Action Buttons */
.btn-debug-action {
  background: rgba(51, 65, 85, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-debug-action:hover {
  background: rgba(71, 85, 105, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-debug-action:active {
  transform: translateY(0);
}

.btn-debug-action.btn-gold {
  background: rgba(180, 83, 9, 0.3);
  border-color: #f59e0b;
  color: #fde68a;
}
.btn-debug-action.btn-gold:hover {
  background: rgba(217, 119, 6, 0.5);
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.btn-debug-action.btn-green {
  background: rgba(21, 128, 61, 0.3);
  border-color: #22c55e;
  color: #bbf7d0;
}
.btn-debug-action.btn-green:hover {
  background: rgba(22, 163, 74, 0.5);
  border-color: #4ade80;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.btn-debug-action.btn-red {
  background: rgba(185, 28, 28, 0.3);
  border-color: #ef4444;
  color: #fecaca;
}
.btn-debug-action.btn-red:hover {
  background: rgba(220, 38, 38, 0.5);
  border-color: #f87171;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-debug-action.btn-blue {
  background: rgba(29, 78, 216, 0.3);
  border-color: #3b82f6;
  color: #bfdbfe;
}
.btn-debug-action.btn-blue:hover {
  background: rgba(37, 99, 235, 0.5);
  border-color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.btn-debug-action.btn-purple {
  background: rgba(126, 34, 206, 0.3);
  border-color: #a855f7;
  color: #e9d5ff;
}
.btn-debug-action.btn-purple:hover {
  background: rgba(147, 51, 234, 0.5);
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

/* Toggle Switch / Checkbox Row */
.debug-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.debug-toggle-label {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-toggle-subtext {
  font-size: 11px;
  color: #94a3b8;
  font-weight: normal;
  display: block;
}

/* Custom Input Rows */
.debug-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.debug-input {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  width: 110px;
  outline: none;
  transition: border-color 0.2s;
}

.debug-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

/* Item & Beast Spawner Catalog Grid */
.debug-spawner-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.debug-search-input {
  flex: 1;
  min-width: 180px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
}

.debug-search-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.debug-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.debug-filter-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.debug-filter-chip:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
}

.debug-filter-chip.active {
  background: #9333ea;
  border-color: #c084fc;
  color: #fff;
}

.debug-cards-scroll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.debug-card-item {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.debug-card-item:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(168, 85, 247, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.debug-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-card-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
}

.debug-card-name {
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debug-card-rarity {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.debug-card-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.debug-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

.debug-card-add-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.debug-card-add-btn:hover {
  opacity: 0.9;
}

/* Custom Node Teleport Select */
.debug-select {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  flex: 1;
}

.debug-select option {
  background: #0f172a;
  color: #f8fafc;
}
