/* ========== Base Reset ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

body {
  position: relative;
  background-color: #f8fafc; /* base tone behind image */
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url(https://profile.followmychallenge.com/assets/img/contours.svg?v2.3);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  mix-blend-mode: hard-light; /* optional: enhances contrast */
  pointer-events: none;
  z-index: -1;
}

/* ========== Design Tokens (Light) ========== */
:root {
  color-scheme: light;
  --bg: #f8fafc;           /* page background */
  --surface: #ffffff;      /* cards, panels */
  --text: #1f2937;         /* primary text */
  --muted: #6b7280;        /* secondary text */
  --border: #e5e7eb;       /* borders, dividers */
  --accent: #2563eb;       /* primary brand */
  --accent-pressed: #1e4fd6;
  --success: #16a34a;
  --warning: #d97706;
  --danger:  #dc2626;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ========== Layout ========== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 24px;
}

/* ========== Card ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ========== Typography ========== */
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
p { margin: 0 0 1rem; }
.text-muted { color: var(--muted); }

/* ========== Buttons ========== */
.button, button, input[type="submit"] {
  appearance: none;
  display: inline-block; cursor: pointer;
  border: 0; border-radius: 10px;
  padding: 10px 16px; font-weight: 600;
  background: var(--accent); color: #fff;
}
.button:hover, button:hover, input[type="submit"]:hover { background: var(--accent-pressed); }
.button.secondary { background: #eef2ff; color: #334155; }
.button.secondary:hover { background: #e0e7ff; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.button.ghost:hover { background: #f3f4f6; }

/* ========== Forms ========== */
label { display: block; margin: .75rem 0 .35rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%; max-width: 520px;
  background: #fff; color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
textarea { min-height: 120px; resize: vertical; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .col { flex: 1 1 240px; min-width: 240px; }
.help { color: var(--muted); font-size: .9rem; }

/* Checkboxes / radios */
.check {
  display: flex; align-items: center; gap: 8px; margin: .75rem 0;
}
.check input[type="checkbox"], .check input[type="radio"] {
  width: 18px; height: 18px;
}

/* ========== Tables (for results/admin) ========== */
.table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table thead th { background: #f3f4f6; font-weight: 700; }
.table tbody tr:hover { background: #fafafa; }

/* ========== Components ========== */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: #eef2ff; color: #334155; font-size: .85rem;
}
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }

/* Alerts */
.alert {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
}
.alert.success { border-color: #bbf7d0; background: #ecfdf5; color: #065f46; }
.alert.warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.alert.danger  { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

/* ========== Utilities (spacing & layout helpers) ========== */
.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:1rem}.mt-4{margin-top:1.5rem}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:1rem}.mb-4{margin-bottom:1.5rem}
.pt-2{padding-top:.5rem}.pt-3{padding-top:1rem}.pb-3{padding-bottom:1rem}
.flex{display:flex}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:1rem}
.grid{display:grid}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}

/* ========== Optional: responsive tweaks ========== */
@media (max-width: 640px) {
  .container { margin: 24px auto; padding: 0 16px; }
}

.country-item{display:flex;align-items:center;gap:10px;padding:8px 10px;cursor:pointer}
.country-item img{width:20px;height:14px;object-fit:cover;border:1px solid var(--border)}
.country-item:hover{background:#f3f4f6}

input.invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }

.socials a {
  color: #fff;
  background: #1a1f27;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.socials a:hover {
  background: #2b3a4a;
  transform: scale(1.1);
}

/* badges */
.badge {display:inline-block;padding:.15rem .45rem;border-radius:999px;font-size:.8rem;line-height:1;border:1px solid #e5e7eb;background:#f8fafc;color:#0f172a}
.badge.ok {background:#ecfdf5;border-color:#bbf7d0;color:#065f46}
.badge.warn {background:#fff7ed;border-color:#fed7aa;color:#7c2d12}
.badge.muted{background:#f1f5f9;color:#475569}

/* claim list */
.claim-item{display:flex;align-items:flex-start;gap:14px;padding:12px 0;border-bottom:1px solid #f1f5f9}
.claim-item:last-child{border-bottom:0}
.claim-main{flex:1 1 auto}
.claim-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}

/* green claim button */
.button-claim{background:#22c55e}          /* same family as Save */
.button-claim:hover{background:#16a34a}
.button-claim:disabled{opacity:.6;cursor:not-allowed}

.winner-icon {
  margin-left: 5px;
  margin-bottom: 3px;
  vertical-align: middle;
}

/* 1st – gold */
.winner-icon.gold {
  color: #f59e0b;
}

/* 2nd – silver */
.winner-icon.silver {
  color: #9ca3af;
}

/* 3rd – bronze */
.winner-icon.bronze {
  color: #b45309;
}