@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-strong: #111521;
  --ink: #eef2ff;
  --muted: #9aa4b4;
  --accent: #ff8a3d;
  --accent-2: #5ce0c7;
  --card: rgba(18, 22, 33, 0.82);
  --border: rgba(238, 242, 255, 0.12);
  --shadow: 0 22px 50px rgba(4, 7, 12, 0.55);
  --glow: 0 0 0 1px rgba(255, 138, 61, 0.16), 0 0 32px rgba(255, 138, 61, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top, #1b2131 0%, var(--bg) 48%, #0b0d12 100%);
  color: var(--ink);
  min-height: 100vh;
  padding: 48px 10vw 64px;
  overflow-x: hidden;
  animation: fadeIn 0.8s ease-out;
}

.background-blob {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.22;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}

.blob-one {
  background: #ff8a3d;
  top: -120px;
  right: -140px;
}

.blob-two {
  background: #2dc7b4;
  bottom: -160px;
  left: -120px;
  animation-delay: 2s;
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.page-enter .site-header {
  animation: headerIn 0.7s ease-out both;
}

.overline {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--accent-2);
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4rem);
  margin: 0 0 8px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 480px;
}

.public-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}

.stat-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(24, 30, 45, 0.9), rgba(16, 20, 30, 0.85));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat-title {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 28px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: rise 0.6s ease-out both;
}

.page-enter .card {
  animation: rise 0.6s ease-out both;
}

.layout .card:nth-child(1) {
  animation-delay: 0.05s;
}

.layout .card:nth-child(2) {
  animation-delay: 0.12s;
}

.layout .card:nth-child(3) {
  animation-delay: 0.18s;
}

.public-highlights .stat-card:nth-child(1) {
  animation: rise 0.6s ease-out both;
  animation-delay: 0.02s;
}

.public-highlights .stat-card:nth-child(2) {
  animation: rise 0.6s ease-out both;
  animation-delay: 0.08s;
}

.public-highlights .stat-card:nth-child(3) {
  animation: rise 0.6s ease-out both;
  animation-delay: 0.14s;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.auth-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.auth-indicator::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff6a4a;
  box-shadow: 0 0 0 4px rgba(255, 106, 74, 0.2);
}

.auth-indicator.is-on {
  color: var(--accent-2);
  border-color: rgba(28, 124, 124, 0.35);
}

.auth-indicator.is-on::before {
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(28, 124, 124, 0.2);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-weight: 500;
  background: rgba(11, 13, 18, 0.7);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
}

.data-table tbody tr {
  transition: transform 0.2s ease, background 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(6px);
}

.scoreboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scoreboard-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.ghost-button,
.primary,
.secondary {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ghost-button {
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  background: transparent;
}

.ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(45, 199, 180, 0.2);
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--glow);
}

.primary:hover {
  transform: translateY(-1px);
}

.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  align-items: end;
}

.form-grid label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-grid input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-strong);
  font-family: inherit;
  color: var(--ink);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  min-height: 20px;
}

.status.is-error {
  color: #ff6a4a;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headerIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

@media (max-width: 960px) {
  body {
    padding: 32px 6vw 48px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
