/* ═══════════════════════════════════════════════
   WestMTA Penal Code Calculator - Styles
   Design: Dark Glassmorphism / Law Enforcement
═══════════════════════════════════════════════ */

:root {
  --bg-dark: #080b12;
  --bg-dark2: #0d1120;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-inner: rgba(255, 255, 255, 0.025);

  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --accent2: #60a5fa;
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.3);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --cat-1: #60a5fa;
  --cat-2: #a78bfa;
  --cat-3: #f472b6;
  --cat-4: #fb923c;
  --cat-5: #34d399;
  --cat-6: #facc15;
  --cat-7: #f87171;
  --cat-8: #c084fc;
  --cat-9: #38bdf8;

  --font-title: 'Rajdhani', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Barlow', sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.07);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ─── ANIMATED BACKGROUND ───────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
  pointer-events: none;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orb-float 12s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #1d4ed8, transparent 70%);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: 4s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #0369a1, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 8s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ─── LAYOUT ─────────────────────────────────── */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ─── GLASS UTILITY ──────────────────────────── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius);
}

.glass-inner {
  background: var(--glass-inner);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

/* ─── HEADER ─────────────────────────────────── */
.header {
  margin: 20px 0;
  padding: 16px 24px;
  border-radius: var(--radius);
  position: sticky;
  top: 12px;
  z-index: 100;
  border-color: rgba(59, 130, 246, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-static {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-static img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.site-title {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #93c5fd, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.site-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.meta-divider {
  width: 1px;
  height: 32px;
  background: var(--glass-border);
}

/* ─── MAIN LAYOUT ────────────────────────────── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

/* ─── CHARGES PANEL ──────────────────────────── */
.charges-panel {
  padding: 0;
  overflow: hidden;
}

.panel-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 42px;
  border-radius: var(--radius-sm);
  border-color: var(--glass-border);
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.05);
}

.search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.clear-search {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s;
  display: none;
}

.clear-search.visible {
  display: block;
}

.clear-search:hover {
  color: var(--text-primary);
}

/* ─── LEVEL 1 TOGGLE ─────────────────────────── */
.level-toggle {
  margin: 0 20px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-track {
  width: 38px;
  height: 22px;
  background: rgba(255,255,255,0.08);
  border-radius: 11px;
  border: 1px solid var(--glass-border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-thumb {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}

.toggle-label input:checked ~ .toggle-track {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.6);
}

.toggle-label input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(16px);
  background: var(--accent);
}

.toggle-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
}

.level-info {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── CHARGES LIST ───────────────────────────── */
.charges-list {
  padding: 16px 20px 20px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.charges-list::-webkit-scrollbar {
  width: 4px;
}

.charges-list::-webkit-scrollbar-track {
  background: transparent;
}

.charges-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* ─── CATEGORY HEADER ────────────────────────── */
.category-header {
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-name {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ─── CHARGE ITEM ────────────────────────────── */
.charge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  background: transparent;
}

.charge-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.charge-item.selected {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

.charge-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.charge-item.selected .charge-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.check-icon {
  display: none;
  color: white;
}

.charge-item.selected .check-icon {
  display: block;
}

.charge-info {
  flex: 1;
  min-width: 0;
}

.charge-name {
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.charge-code-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.charge-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.charge-fine {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #86efac;
}

.charge-prison {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #fca5a5;
}

.charge-prison.none {
  color: var(--text-muted);
}

/* ─── NO RESULTS ─────────────────────────────── */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ─── SUMMARY PANEL ──────────────────────────── */
.summary-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px;
}

.summary-box {
  padding: 20px;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.empty-state {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

.summary-selected {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.summary-selected::-webkit-scrollbar {
  width: 3px;
}

.summary-selected::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.selected-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 6px;
  animation: tag-in 0.15s ease;
}

@keyframes tag-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.selected-tag-name {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-tag-code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent2);
  flex-shrink: 0;
}

.selected-tag-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.selected-tag-remove:hover {
  color: var(--danger);
}

/* ─── RESULT BOX ─────────────────────────────── */
.result-box {
  padding: 20px;
}

.result-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.result-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
}

.result-val.min {
  color: #86efac;
}

.result-val.max {
  color: #4ade80;
  text-shadow: 0 0 20px var(--success-glow);
}

.result-val.prison {
  color: #fca5a5;
  text-shadow: 0 0 20px var(--danger-glow);
}

.result-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 14px 0;
}

.btk-section {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.btk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.btk-tag {
  background: rgba(147, 197, 253, 0.08);
  border: 1px solid rgba(147, 197, 253, 0.2);
  color: #93c5fd;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

/* ─── CAP WARNING ────────────────────────────── */
.cap-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  color: #fcd34d;
  font-size: 12px;
  line-height: 1.4;
}

.cap-warning svg {
  flex-shrink: 0;
}

.cap-warning.hidden {
  display: none;
}

/* ─── INFO BOX ───────────────────────────────── */
.info-box {
  padding: 16px 20px;
}

.info-title {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-list li {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}

.info-list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--accent);
}

.info-list strong {
  color: var(--text-secondary);
}

/* ─── FOOTER ─────────────────────────────────── */
.footer {
  text-align: center;
  padding: 20px 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-sep {
  opacity: 0.3;
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
    order: -1;
  }

  .charges-list {
    max-height: 60vh;
  }

  .header-meta {
    display: none;
  }
}

@media (max-width: 600px) {
  .app-wrapper {
    padding: 0 12px 30px;
  }

  .header {
    padding: 12px 16px;
    top: 8px;
    margin: 10px 0;
  }

  .site-title {
    font-size: 22px;
  }

  .result-val {
    font-size: 15px;
  }
}

/* ─── HIGHLIGHT ON SEARCH ────────────────────── */
.highlight {
  background: rgba(250, 204, 21, 0.25);
  color: #fde68a;
  border-radius: 2px;
  padding: 0 1px;
}

/* ─── BOTTOM BAR ─────────────────────────────── */
.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 0;
  padding: 14px 24px;
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.bottom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 9px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-rules {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.3);
  color: #93c5fd;
}
.btn-rules:hover {
  background: rgba(59,130,246,0.22);
  border-color: rgba(59,130,246,0.6);
  color: #fff;
  box-shadow: 0 0 20px rgba(59,130,246,0.2);
}

.btn-bug {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.25);
  color: #fcd34d;
}
.btn-bug:hover {
  background: rgba(245,158,11,0.2);
  border-color: rgba(245,158,11,0.5);
  color: #fff;
}

.btn-forum {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.25);
  color: #86efac;
}
.btn-forum:hover {
  background: rgba(34,197,94,0.2);
  border-color: rgba(34,197,94,0.5);
  color: #fff;
}

/* ─── FOOTER CREDIT ──────────────────────────── */
.footer-credit {
  color: var(--text-muted);
}
.footer-credit strong {
  color: var(--text-secondary);
}
.footer-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ─── MODALS ─────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}
.modal-overlay.show { display: flex !important; }

.modal-box {
  width: 100%;
  max-width: 700px;
  border-radius: 18px;
  overflow: hidden;
  animation: modal-in 0.25s cubic-bezier(.34,1.56,.64,1);
  margin: auto;
}
.modal-box-sm { max-width: 440px; }

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--glass-border);
  gap: 12px;
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #93c5fd;
}
.modal-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  line-height: 1.3;
}
.modal-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.modal-close:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.35);
  color: #fca5a5;
}

.modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 72vh;
  overflow-y: auto;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ─── RULE ITEMS ─────────────────────────────── */
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.rule-item:hover { border-color: rgba(255,255,255,0.12); }

.rule-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  white-space: nowrap;
}
.rule-red    { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; }
.rule-green  { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3);  color: #86efac; }
.rule-yellow { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.rule-danger { background: rgba(220,38,38,0.2);  border: 1px solid rgba(220,38,38,0.5);  color: #f87171; animation: pulse-danger 2s infinite; }

@keyframes pulse-danger {
  0%,100% { box-shadow: none; }
  50%     { box-shadow: 0 0 12px rgba(220,38,38,0.4); }
}

.rule-content { flex: 1; }
.rule-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  letter-spacing: 0.03em;
}
.rule-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── BUG MODAL ──────────────────────────────── */
.bug-note-top {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
}
.bug-info { display: flex; flex-direction: column; gap: 10px; }
.bug-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}
.bug-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  flex-shrink: 0;
}
.bug-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.bug-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.bug-link {
  color: #93c5fd;
  text-decoration: none;
  transition: color 0.2s;
}
.bug-link:hover { color: #fff; text-decoration: underline; }

/* ─── BTK COPY BUTTON ────────────────────────── */
.btk-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}
.copy-btk-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}
.copy-btk-btn:hover {
  background: rgba(59,130,246,0.22);
  border-color: rgba(59,130,246,0.5);
  color: #fff;
}
.copy-btk-btn.copied {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.4);
  color: #86efac;
}

/* ─── COPY TOAST ─────────────────────────────── */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.4);
  color: #86efac;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── BTK SECTION fix ────────────────────────── */
.btk-section {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
