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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

button:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Common Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  line-height: 1.2;
}

.badge-live {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.badge-redzone {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  animation: pulse-redzone 1.5s infinite;
}

.badge-halftime {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  letter-spacing: 0.05em;
}

.badge-final {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-pre {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-network {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.65rem;
  padding: 1px 5px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

/* Animations */
@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

@keyframes pulse-redzone {
  0%, 100% {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
  }
  50% {
    background: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
  }
}

@keyframes score-flash {
  0% {
    background-color: rgba(245, 158, 11, 0.45);
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
    box-shadow: none;
  }
}

.score-updated {
  animation: score-flash 2.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Live beacon dot */
.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-red);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-live 1.2s infinite ease-in-out;
}
