:root {
  color-scheme: light;
  --primary: #fb7a1e;
  --primary-2: #f43f5e;
  --primary-grad: linear-gradient(135deg, #fb923c 0%, #f43f5e 100%);
  --primary-dark: #c2410c;
  --accent: #16a34a;
  --bg: #fdf6ef;
  --card-bg: #ffffff;
  --text: #1c1917;
  --muted: #78716c;
  --border: #f0e4d7;
  --success: #059669;
  --success-bg: #d1fae5;
  --error: #dc2626;
  --error-bg: #fee2e2;
  --gold: #d97706;
  --shadow-sm: 0 1px 2px rgba(28,25,23,0.04), 0 1px 3px rgba(28,25,23,0.06);
  --shadow-md: 0 4px 14px rgba(28,25,23,0.06), 0 2px 4px rgba(28,25,23,0.04);
  --shadow-lg: 0 12px 32px rgba(251,122,30,0.14), 0 4px 10px rgba(28,25,23,0.06);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(251,146,60,0.10), transparent),
    radial-gradient(900px 500px at 100% 0%, rgba(244,63,94,0.08), transparent),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
h1, h2, h3 { letter-spacing: -0.02em; font-weight: 800; }
a { color: var(--primary-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-dark); text-decoration: none; }

/* Top nav — sticky, glassy */
.topbar {
  background: rgba(17,24,39,0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.topbar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; gap: 10px; }
.topbar .brand { color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.topbar .brand:hover { text-decoration: none; opacity: 0.9; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; justify-content: flex-end; }
.topbar nav a { color: #cbd5e1; font-size: 13.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; transition: all .15s ease; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.topbar nav a.btn-nav { background: var(--primary-grad); color: #fff; padding: 8px 18px; border-radius: 999px; box-shadow: 0 4px 14px rgba(244,63,94,0.35); }
.topbar nav a.btn-nav:hover { background: var(--primary-grad); filter: brightness(1.08); transform: translateY(-1px); }

.admin-mode-banner {
  background: linear-gradient(90deg, #1e1b4b, #3730a3);
  color: #fde68a;
  text-align: center;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.content { max-width: 1100px; margin: 0 auto; padding: 32px 20px 20px; }

/* Hero */
.hero { text-align: center; padding: 46px 20px 14px; }
.hero h1 {
  font-size: 38px;
  margin-bottom: 10px;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 620px; margin: 0 auto 22px; }
.prize-banner {
  background: linear-gradient(135deg,#fef3c7,#fecaca);
  border: 1px solid rgba(217,119,6,0.15);
  border-radius: 999px;
  padding: 12px 26px;
  display: inline-block;
  font-weight: 700;
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
  transition: box-shadow .2s ease, transform .2s ease;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Forms */
label { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 13px; color: #44403c; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14.5px;
  background: #fffefc;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(251,122,30,0.14);
}
textarea { resize: vertical; min-height: 90px; }
.help-text { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 6px 18px rgba(244,63,94,0.32); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(244,63,94,0.4); text-decoration: none; }
.btn-secondary { background: #f5f0e9; color: var(--text); }
.btn-secondary:hover { background: #ece3d6; text-decoration: none; transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg,#22c55e,#059669); color: #fff; box-shadow: 0 6px 16px rgba(5,150,105,0.3); }
.btn-success:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-danger { background: var(--error-bg); color: var(--error); }
.btn-danger:hover { background: #fecaca; transform: translateY(-1px); }
.btn-sm { padding: 7px 16px; font-size: 12.5px; margin-top: 0; }

/* Alerts */
.alert { padding: 13px 18px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); color: #065f46; border-color: rgba(5,150,105,0.15); }
.alert-error { background: var(--error-bg); color: #991b1b; border-color: rgba(220,38,38,0.15); }
.alert-info { background: #dbeafe; color: #1e3a8a; border-color: rgba(30,58,138,0.12); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #fdf6ef; font-weight: 700; color: #57534e; }
.table-wrap { overflow-x: auto; }

@media (max-width: 640px) {
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap th, .table-wrap td, .table-wrap tr { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tr { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; padding: 6px 4px; background: #fffefc; box-shadow: var(--shadow-sm); }
  .table-wrap td { border-bottom: none; padding: 7px 12px; display: flex; justify-content: space-between; gap: 10px; text-align: right; }
  .table-wrap td::before { content: attr(data-label); font-weight: 700; text-align: left; color: var(--muted); }
}

/* Achievement badges */
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .badge-grid { grid-template-columns: repeat(2, 1fr); } }
.badge-tile { text-align: center; padding: 16px 10px; border-radius: 14px; transition: transform .15s ease; }
.badge-tile.earned { background: linear-gradient(135deg,#fff7ed,#fde68a); box-shadow: var(--shadow-md); }
.badge-tile.earned:hover { transform: translateY(-2px); }
.badge-tile.locked { background: #f5f0e9; opacity: 0.5; filter: grayscale(1); }
.badge-emoji { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.badge-label { font-weight: 800; font-size: 12.5px; margin-bottom: 3px; }
.badge-desc { font-size: 10.5px; color: var(--muted); line-height: 1.3; }

/* Podium (top 3 highlight above the full leaderboard list) */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 6px 0 26px; }
.podium-spot { text-align: center; flex: 1; max-width: 150px; }
.podium-medal { font-size: 32px; line-height: 1; }
.podium-name { font-weight: 800; font-size: 14px; margin: 6px 0 2px; word-break: break-word; }
.podium-stats { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.podium-bar { border-radius: 14px 14px 4px 4px; box-shadow: var(--shadow-sm); }
.podium-1 .podium-bar { height: 92px; background: linear-gradient(135deg,#fde68a,#f59e0b); }
.podium-2 .podium-bar { height: 66px; background: linear-gradient(135deg,#e5e7eb,#9ca3af); }
.podium-3 .podium-bar { height: 50px; background: linear-gradient(135deg,#fdba74,#c2410c); }
@media (max-width: 480px) { .podium-spot { max-width: 105px; } .podium-medal { font-size: 26px; } .podium-name { font-size: 12px; } }

/* Leaderboard */
.leaderboard-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); transition: background .15s ease; border-radius: 12px; }
.leaderboard-row:hover { background: #fdf6ef; }
.rank-badge {
  width: 38px; height: 38px; border-radius: 50%;
  background: #f5f0e9; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.rank-1 { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #78350f; }
.rank-2 { background: linear-gradient(135deg,#e5e7eb,#9ca3af); color: #374151; }
.rank-3 { background: linear-gradient(135deg,#fdba74,#c2410c); color: #fff; }
.leaderboard-name { font-weight: 700; flex: 1; }
.leaderboard-stats { text-align: right; font-size: 13px; color: var(--muted); }
.leaderboard-stats strong { color: var(--text); font-size: 16px; }

/* Status pills */
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; }
.status-pending { background: #fef3c7; color: var(--gold); }
.status-verified { background: var(--success-bg); color: var(--success); }
.status-rejected { background: var(--error-bg); color: var(--error); }

.proof-thumb { max-width: 160px; max-height: 160px; border-radius: 12px; border: 1px solid var(--border); display: block; box-shadow: var(--shadow-sm); }
.story-box { background: #fdf9f3; border: 1px dashed #e7d8c3; border-radius: 12px; padding: 14px; font-size: 14px; margin-top: 8px; }
.copy-box { width: 100%; min-height: 90px; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }

.winner-card { text-align: center; padding: 30px 22px; background: linear-gradient(135deg,#fff7ed,#fde68a); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.winner-card .medal { font-size: 42px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12)); }
.muted { color: var(--muted); font-size: 14px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.mt0 { margin-top: 0; }

.site-footer { text-align: center; padding: 30px 20px 24px; color: var(--muted); font-size: 13px; }
.site-footer a { font-weight: 600; }

.checklist { list-style: none; padding: 0; }
.checklist li { padding: 6px 0; font-size: 14px; }
.checklist li.bad { color: var(--error); }
.checklist li.ok { color: var(--success); }

.step-guide { counter-reset: step; list-style: none; padding: 0; }
.step-guide li { counter-increment: step; margin-bottom: 16px; padding-left: 40px; position: relative; }
.step-guide li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  background: var(--primary-grad); color: #fff;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(244,63,94,0.3);
}
