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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
}

.container {
  width: 100%;
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  background: #ffffff;
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  color: #0f172a;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: #64748b;
  font-size: 0.9rem;
}

.subtitle a {
  color: #475569;
  text-decoration: none;
}

.subtitle a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.site-footer {
  padding: 1rem 2rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

code {
  background: #e2e8f0;
  color: #334155;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-width: 420px;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}

input {
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 1rem;
}

input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: #2563eb;
}

button {
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover {
  background: #1d4ed8;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-message {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.9rem;
}

.loader {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem 0;
  color: #64748b;
}

.loader[hidden] {
  display: none;
}

.loader-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: loader-spin 0.7s linear infinite;
}

.loader-text {
  font-size: 0.95rem;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.result {
  margin-top: 0.5rem;
}

.player-name {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  color: #0f172a;
}

.matches-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 0.95rem;
}

.matches-stats[hidden] {
  display: none;
}

.matches-stat strong {
  color: #0f172a;
  font-weight: 700;
}

.matches-heading {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #475569;
  font-weight: 600;
}

.timeline {
  width: 100%;
  min-height: 320px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.timeline[hidden] {
  display: none;
}

.vis-timeline {
  border: none;
  font-family: inherit;
}

.vis-item {
  background-color: #3b82f6;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.vis-item.vis-selected {
  background-color: #60a5fa;
  border-color: #3b82f6;
}

.vis-time-axis .vis-text {
  color: #64748b;
}

.vis-time-axis .vis-grid.vis-minor {
  border-color: #e2e8f0;
}

.vis-time-axis .vis-grid.vis-major {
  border-color: #cbd5e1;
}

.vis-panel.vis-background {
  background: #f8fafc;
}

.vis-labelset .vis-label {
  color: #334155;
}

.vis-current-time {
  background-color: #ef4444;
}

.no-matches {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.no-matches[hidden] {
  display: none;
}
