
:root {
  --bg: #f4f6f9;
  --ink: #0f172a;
  --accent: #1f8a70;
  --accent-dark: #0f6b56;
  --accent-soft: #d6f1ea;
  --sunset: #eef2f7;
  --card: #ffffff;
  --muted: #5b6472;
  --border: #e1e6ee;
  --shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(31, 138, 112, 0.12), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(15, 107, 86, 0.08), transparent 35%),
    linear-gradient(135deg, #f8fafc, var(--bg));
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px;
  width: min(420px, 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  animation: rise 0.6s ease;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, rgba(31, 138, 112, 0.9), rgba(47, 184, 150, 0.4)) 1;
  pointer-events: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 8px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

h1,
h2,
h3,
h4 {
  font-family: "Sora", sans-serif;
  margin: 0 0 8px;
}

.subtext {
  color: var(--muted);
  margin: 0 0 24px;
}

label {
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

input,
textarea {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(31, 138, 112, 0.6);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.15);
}

input[type="range"] {
  padding: 0;
  border-radius: 999px;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), #7fd7c0);
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-dark);
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-dark);
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-value {
  font-weight: 600;
  min-width: 70px;
  text-align: right;
}

textarea {
  resize: vertical;
}

button {
  border: none;
  background: linear-gradient(120deg, var(--accent), #2fb896);
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(31, 138, 112, 0.25);
}

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

button.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.btn-no {
  background: linear-gradient(120deg, #e3607a, #c7526a);
  box-shadow: 0 12px 24px rgba(227, 96, 122, 0.22);
}

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

form {
  display: grid;
  gap: 16px;
}

.error {
  color: #b42318;
  font-size: 0.85rem;
  min-height: 1em;
}

.login-hint {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.content {
  flex: 1;
  padding: 24px;
  padding-bottom: 100px;
  max-width: 1100px;
  margin: 0 auto;
}

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.tab-header p {
  margin: 0;
  color: var(--muted);
}

.event-strip {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 8px;
}

.event-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  opacity: 1;
}

.event-card.animate {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.6s ease forwards;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.price-card {
  border-radius: 12px;
  padding: 12px;
  background: var(--sunset);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.price-card.no {
  background: #f6d7e1;
}

.price-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.bets {
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf1f6;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.win {
  background: #c7f2d8;
  color: #0f5132;
}

.stack {
  display: grid;
  gap: 12px;
}

.profile-grid {
  display: grid;
  gap: 16px;
}

.leaderboard {
  display: grid;
  gap: 12px;
}

.leaderboard-head {
  display: grid;
  grid-template-columns: 80px 1fr 120px;
  gap: 12px;
  padding: 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

.leaderboard-row.me {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.12);
}

.leaderboard-rank {
  font-weight: 700;
  color: var(--ink);
}

.leaderboard-name {
  font-weight: 600;
}

.leaderboard-points {
  font-weight: 700;
  text-align: right;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

.points {
  font-size: 2rem;
  font-weight: 700;
}

.inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 12px 16px 20px;
  background: rgba(248, 250, 252, 0.9);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.8s ease;
}

.tab-btn {
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-weight: 600;
  border-radius: 12px;
  padding: 8px 16px;
  border: 1px solid transparent;
}

.tab-btn.active {
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.12);
  background: white;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.modal-card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  width: min(480px, 100%);
  box-shadow: var(--shadow);
  animation: rise 0.3s ease;
}

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

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

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

.pulse {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}
@media (min-width: 900px) {
  .content {
    padding: 32px 48px 110px;
  }
  .profile-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .event-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
