/* =========================================================
   DEBUG LAYOUT
   ========================================================= */

.debug-overview-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.debug-main-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}

.debug-left-column,
.debug-right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =========================================================
   HERO / HEADER
   ========================================================= */

.debug-hero-card {
  padding: 18px;
}

.debug-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.debug-page-title {
  font-size: 24px;
  margin: 0;
}

.debug-page-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.debug-status-strip {
  display: flex;
  gap: 12px;
}

.debug-status-box {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 120px;
}

.debug-status-label {
  font-size: 11px;
  color: var(--muted);
}

.debug-status-value {
  font-size: 14px;
  font-weight: 700;
}

/* =========================================================
   SUMMARY
   ========================================================= */

.debug-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.debug-summary-box {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.debug-summary-label {
  font-size: 12px;
  color: var(--muted);
}

.debug-summary-value {
  font-size: 20px;
  font-weight: 800;
}

/* =========================================================
   MATCH CARDS
   ========================================================= */

.debug-match-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.match-title {
  font-size: 16px;
  font-weight: 800;
}

.league {
  font-size: 12px;
  color: var(--muted);
}

.scorebox {
  text-align: right;
}

.score {
  font-size: 26px;
  font-weight: 900;
}

.clock {
  font-size: 14px;
  color: var(--accent);
}

/* =========================================================
   META GRID
   ========================================================= */

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.mini {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.mini-label {
  font-size: 11px;
  color: var(--muted);
}

.mini-value {
  font-size: 14px;
  font-weight: 700;
}

/* =========================================================
   SIGNALS
   ========================================================= */

.signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* =========================================================
   RAW DEBUG
   ========================================================= */

.raw-times {
  font-family: monospace;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 12px;
}

/* =========================================================
   TIMELINE
   ========================================================= */

.timeline-panel {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.timeline-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.timeline-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-meta {
  font-size: 11px;
  color: var(--muted);
}

/* =========================================================
   ALERTS
   ========================================================= */

.goal-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
}

.goal-alert-title {
  font-size: 16px;
  margin-bottom: 4px;
}

/* =========================================================
   EVENTS
   ========================================================= */

.events-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.event-time {
  font-size: 11px;
  color: var(--muted);
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

.goal-flash {
  animation: flashDanger 1.2s ease-in-out 3;
}

.goal-flash-good {
  animation: flashGood 1.2s ease-in-out 3;
}

.debug-block {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.debug-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.debug-reason-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.debug-reason {
  border-left: 3px solid var(--border);
  padding-left: 10px;
}

.debug-reason.good {
  border-left-color: #22c55e;
}

.debug-reason.warn {
  border-left-color: #f59e0b;
}

.debug-reason.bad {
  border-left-color: #ef4444;
}

.debug-reason.info {
  border-left-color: rgba(139, 92, 246, 0.7);
}

.debug-reason-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.debug-reason-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.debug-kv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.debug-kv {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.debug-kv span {
  font-size: 11px;
  color: var(--muted);
}

.debug-kv strong {
  font-size: 14px;
  color: var(--text);
}

/* ================= DELTA ================= */

.delta-panel {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
}

.delta-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--muted);
}

.delta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.delta-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.delta-up {
  color: #22c55e;
}

.delta-down {
  color: #ef4444;
}

@media (max-width: 760px) {
  .debug-kv-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes flashDanger {
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
}

@keyframes flashGood {
  50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .debug-main-grid {
    grid-template-columns: 1fr;
  }

  .debug-overview-grid {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}