#goal-alert-host {
  margin-top: 10px;
  width: 100%;
}

#goal-alert-host:empty {
  display: none;
}

#recent-events {
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}

.match-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.match-title {
  font-size: 20px;
  font-weight: 700;
}

.league {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.scorebox {
  text-align: right;
}

.score {
  font-size: 28px;
  font-weight: 800;
}

.clock {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

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

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

.mini-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  display: block;
}

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

.delay-good {
  color: var(--good);
  font-weight: 700;
}

.delay-warn {
  color: var(--warn);
  font-weight: 700;
}

.delay-bad {
  color: var(--danger);
  font-weight: 700;
}

.signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.raw-times {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.empty {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.goal-alert {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.10);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  animation: goalPulse 1.2s ease-in-out 3;
}

.goal-alert-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.goal-alert-meta {
  color: var(--muted);
  font-size: 13px;
}

.events-panel {
  min-height: 60px;
}

.events-panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.event-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.event-time {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.goal-flash {
  animation: cardFlash 1.4s ease-in-out 3;
  border-color: rgba(239, 68, 68, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), 0 0 24px rgba(239, 68, 68, 0.25);
}

.goal-flash-good {
  animation: cardFlashGood 1.4s ease-in-out 3;
  border-color: rgba(34, 197, 94, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35), 0 0 24px rgba(34, 197, 94, 0.25);
}

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

.timeline-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

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

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

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

.timeline-line {
  font-size: 14px;
}

.timeline-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.live-banner {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.95), rgba(248, 113, 113, 0.95));
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.35);
  position: sticky;
  top: 0;
  z-index: 50;
}

.live-banner.hidden {
  display: none;
}

.live-banner-inner {
  position: absolute;
  top: 8px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #ffdede;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

.footer {
  margin-top: 40px;
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.footer-inner {
  max-width: 1680px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  opacity: 0.7;
}

.footer-inner {
  text-align: center;
}

.subtitle span {
  color: var(--accent);
}



@keyframes goalPulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.01); opacity: 1; }
  100% { transform: scale(1); opacity: 0.95; }
}

@keyframes cardFlash {
  0% { background: rgba(239, 68, 68, 0.06); }
  50% { background: rgba(239, 68, 68, 0.18); }
  100% { background: transparent; }
}

@keyframes cardFlashGood {
  0% { background: rgba(34, 197, 94, 0.06); }
  50% { background: rgba(34, 197, 94, 0.18); }
  100% { background: transparent; }
}

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

  .match-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .scorebox {
    text-align: left;
  }
}