:root {
  --bg-1: #0b1224;
  --bg-2: #131b34;
  --card: rgba(30, 41, 59, 0.6);
  --card-solid: #1b2438;
  --card-border: rgba(148, 163, 184, 0.14);
  --accent: #22c55e;
  --accent-2: #34d399;
  --accent-dark: #16a34a;
  --americano: #38bdf8;
  --mexicano: #f59e0b;
  --danger: #f87171;
  --text: #eef2f8;
  --muted: #93a1b8;
  --border: #2a3552;
  --radius: 16px;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(34, 197, 94, 0.15), 0 8px 24px rgba(34, 197, 94, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(34, 197, 94, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 60%, var(--bg-1));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 96px;
  animation: fade-in 0.35s ease-out;
}

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

h1, h2, h3 { margin: 0.4em 0; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 700; color: var(--muted); }

a { color: var(--accent-2); text-decoration: none; }

.brand-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
  position: relative;
}
.brand-header a, .brand-header span:not(.lang-toggle):not(.beta-badge) {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #a7f3d0, var(--accent-2) 45%, var(--americano));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lang-toggle {
  position: absolute;
  right: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.subtitle {
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
  margin: -8px 0 20px;
  line-height: 1.5;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-solid));
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

input[type=text], input[type=number], input[type=password], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(6, 12, 26, 0.6);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  margin-top: 6px;
  margin-bottom: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

textarea { resize: vertical; line-height: 1.4; }

label { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-dark));
  color: #052e16;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

button:hover { filter: brightness(1.06); transform: translateY(-1px); }
button:active { transform: translateY(0) scale(0.97); box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3); }

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
  box-shadow: none;
}

button.secondary {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}
button.secondary:hover { background: rgba(148, 163, 184, 0.18); }

button.icon {
  width: 52px;
  height: 52px;
  font-size: 26px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
  font-weight: 400;
}
button.icon:hover { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.4); }
button.icon:active { transform: scale(0.9); background: rgba(34, 197, 94, 0.28); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; }

.match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}
.match:last-child { border-bottom: none; }

.team {
  flex: 1;
  text-align: center;
  border-radius: 12px;
  padding: 8px 4px;
  transition: background 0.25s ease;
}
.team.leading {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), transparent);
}
.team.leading .score-value { color: var(--accent-2); }
.team.leading .team-names { color: var(--text); font-weight: 700; }

.team-names {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 600;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.score-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.score-value {
  font-size: 30px;
  font-weight: 800;
  min-width: 42px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease, transform 0.15s ease;
}

.vs {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 6px;
}

.court-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.leaderboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.leaderboard-row:hover { background: rgba(148, 163, 184, 0.06); }
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row.top-3 { font-weight: 700; }

.leaderboard-name { display: flex; align-items: center; gap: 10px; }
.leaderboard-stats { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.rank {
  color: var(--muted);
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.share-box {
  display: flex; gap: 8px; align-items: center;
}
.share-box input {
  margin: 0;
  flex: 1;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 14px;
  cursor: pointer;
}

.error {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}

.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.badge {
  display: inline-block;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--muted);
  white-space: nowrap;
}
.badge-americano { color: var(--americano); border-color: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.1); }
.badge-mexicano { color: var(--mexicano); border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); }

@media (max-width: 480px) {
  h1 { font-size: 1.35rem; }
  .card { padding: 16px; border-radius: 14px; }
  button.icon { width: 46px; height: 46px; font-size: 22px; }
  .score-value { font-size: 26px; }
}



.beta-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--mexicano);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  vertical-align: middle;
  cursor: help;
}

.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
  padding-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.app-footer a { color: var(--muted); }
.app-footer a:hover { color: var(--accent-2); }
.footer-sep { color: var(--border); }


