/* ============================================================
   Aposta Copa Mundial by Asau — user wizard styles (light theme)
   ============================================================ */

:root {
  --uw-bg-card: #ffffff;
  --uw-text-primary: #14213d;
  --uw-text-secondary: #5b6b85;
  --uw-text-muted: #94a3b8;
  --uw-border: #e3e8f0;
  --uw-accent-navy: #1d3a6e;
  --uw-accent-blue: #2f5fd6;
  --uw-accent-gold: #f5a623;
  --uw-accent-green: #16a34a;
  --uw-accent-red: #ef4444;
  --uw-radius-md: 10px;
  --uw-radius-lg: 16px;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100vh; }

body.wizard-body {
  font-family: var(--font-body);
  background-color: #16321f;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(255,255,255,0.06), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 60px, transparent 60px, transparent 120px),
    linear-gradient(180deg, #1d4228 0%, #14301c 55%, #0f2415 100%);
  background-attachment: fixed;
  padding: 40px 16px;
  color: var(--uw-text-primary);
}

.wizard-card {
  max-width: 920px;
  margin: 0 auto;
  background: var(--uw-bg-card);
  border-radius: var(--uw-radius-lg);
  padding: 36px 48px 44px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

.wizard-header { text-align: center; margin-bottom: 28px; }
.wizard-header-top {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 6px;
}
.wizard-header img { width: 38px; height: 38px; border-radius: 50%; }
.wizard-header h1 {
  font-family: var(--font-display);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}
.wizard-header h1 .accent { color: var(--uw-accent-gold); }
.wizard-header .standings-link { font-size: 14px; color: var(--uw-accent-blue); font-weight: 600; }

.lang-switch {
  position: absolute;
  top: 28px; right: 28px;
}
.lang-switch select {
  border: 1px solid var(--uw-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  background: #fff;
}

/* ---------- Step indicator ---------- */
.step-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 32px;
  position: relative;
}
.step-track::before {
  content: '';
  position: absolute;
  top: 17px; left: 5%; right: 5%;
  height: 2px;
  background: var(--uw-border);
  z-index: 0;
}
.step-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative; z-index: 1; flex: 1;
}
.step-circle {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: #fff;
  border: 2px solid var(--uw-border);
  color: var(--uw-text-muted);
}
.step-item.done .step-circle { background: var(--uw-accent-green); border-color: var(--uw-accent-green); color: #fff; }
.step-item.active .step-circle { background: var(--uw-accent-navy); border-color: var(--uw-accent-navy); color: #fff; }
.step-label { font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--uw-text-muted); font-weight: 600; }
.step-item.active .step-label { color: var(--uw-accent-navy); }
.step-item.done .step-label { color: var(--uw-accent-green); }

.step-progress-line {
  position: absolute; top: 17px; left: 5%; height: 2px;
  background: var(--uw-accent-blue);
  z-index: 0;
  transition: width 0.3s;
}

/* ---------- Step content ---------- */
.step-heading {
  display: flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--uw-border);
}
.step-heading .num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--uw-accent-navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

.terms-box {
  border: 1px solid var(--uw-border);
  border-radius: var(--uw-radius-md);
  padding: 20px 22px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: var(--uw-text-secondary);
  margin-bottom: 18px;
}
.terms-box ol { padding-left: 20px; margin: 0; }
.terms-box li { margin-bottom: 10px; }

.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  background: #eef3fb;
  border-radius: var(--uw-radius-md);
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 500;
}
.checkbox-row input { width: 18px; height: 18px; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field-label .req { color: var(--uw-accent-red); }

.field-input {
  width: 100%;
  border: 1px solid var(--uw-border);
  border-radius: var(--uw-radius-md);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--uw-text-primary);
}
.field-input:focus { outline: none; border-color: var(--uw-accent-blue); box-shadow: 0 0 0 3px rgba(47,95,214,0.15); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }

.phone-input { display: flex; }
.phone-input .prefix {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--uw-border);
  border-right: none;
  border-radius: var(--uw-radius-md) 0 0 var(--uw-radius-md);
  padding: 0 12px;
  font-size: 14px;
  color: var(--uw-text-secondary);
  background: #f8fafc;
}
.phone-input .field-input { border-radius: 0 var(--uw-radius-md) var(--uw-radius-md) 0; }

.photo-upload-row {
  display: flex; align-items: center; gap: 18px;
  background: #f8fafc;
  border-radius: var(--uw-radius-md);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.photo-upload-row .avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; border: 1px solid var(--uw-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--uw-accent-navy);
  overflow: hidden;
}
.photo-upload-row .avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-row .info { flex: 1; }
.photo-upload-row .info .title { font-weight: 700; margin-bottom: 2px; }
.photo-upload-row .info .desc { font-size: 13px; color: var(--uw-text-secondary); }
.upload-status { font-size: 12px; color: var(--uw-accent-green); font-weight: 600; margin-left: 10px; }

/* ---------- Bet amount cards ---------- */
.bet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.bet-card {
  border: 2px solid var(--uw-border);
  border-radius: var(--uw-radius-md);
  padding: 22px 0;
  text-align: center;
  cursor: pointer;
  position: relative;
}
.bet-card .amount { font-size: 26px; font-weight: 800; }
.bet-card .label { font-size: 12px; color: var(--uw-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.bet-card.selected { border-color: var(--uw-accent-gold); background: #fff8ec; }
.bet-card.selected .amount { color: #b9790f; }
.bet-card .check {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--uw-accent-gold); color: #fff;
  display: none; align-items: center; justify-content: center; font-size: 12px;
}
.bet-card.selected .check { display: flex; }

.bet-summary {
  background: var(--uw-accent-navy);
  color: #fff;
  border-radius: var(--uw-radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}
.bet-summary .amount { font-size: 24px; font-weight: 800; color: var(--uw-accent-gold); }
.bet-summary .note { font-size: 13px; color: #c9d6f0; margin-top: 4px; }

/* ---------- Predictions table ---------- */
.predict-progress {
  height: 6px; border-radius: 999px; background: var(--uw-border);
  margin-bottom: 18px; overflow: hidden;
}
.predict-progress-fill { height: 100%; background: linear-gradient(90deg, var(--uw-accent-blue), var(--uw-accent-green)); width: 0%; transition: width 0.2s; }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--uw-border); border-radius: 999px; }
.predict-table { width: 100%; min-width: 540px; border-collapse: collapse; }
.predict-table thead th {
  background: var(--uw-accent-navy); color: #fff;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px 10px; text-align: center;
}
.predict-table thead th.choice-col { width: 46px; }
.predict-table tbody td { padding: 12px 10px; border-bottom: 1px solid var(--uw-border); font-size: 14px; }
.predict-table .match-cell {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  column-gap: 8px;
}
.predict-table .match-cell .team-name.home { text-align: right; }
.predict-table .match-cell .team-name.away { text-align: left; }
.predict-table .team-name { font-weight: 600; white-space: nowrap; }
.predict-table .match-date { font-size: 12px; color: var(--uw-text-muted); white-space: nowrap; text-align: center; padding: 0 4px; }
.flag-icon { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* Review table (Step 5) — same grid layout as the Predict table, so flags
   and team names align in fixed columns across every row regardless of
   how long each team's name is. */
.review-table .match-cell {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  column-gap: 6px;
}
.review-table .match-cell .team-name.home { text-align: right; }
.review-table .match-cell .team-name.away { text-align: left; }
.review-table .team-name { font-weight: 600; white-space: nowrap; font-size: 13px; }
.review-table .match-date { font-size: 11px; color: var(--uw-text-muted); white-space: nowrap; text-align: center; padding: 0 3px; }
.review-table .flag-icon-sm { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.choice-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid var(--uw-border);
  background: #fff;
  font-weight: 700; font-size: 13px;
  cursor: pointer;
  color: var(--uw-text-secondary);
}
.choice-btn.active.h { background: var(--uw-accent-green); border-color: var(--uw-accent-green); color: #fff; }
.choice-btn.active.d { background: var(--uw-accent-gold); border-color: var(--uw-accent-gold); color: #fff; }
.choice-btn.active.a { background: var(--uw-accent-red); border-color: var(--uw-accent-red); color: #fff; }

/* ---------- Review page ---------- */
.review-section { margin-bottom: 26px; }
.review-section-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.review-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.review-profile img, .review-profile .avatar-fallback {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  background: #eef3fb; display: flex; align-items: center; justify-content: center;
}
.review-profile .name { font-weight: 700; font-size: 16px; }
.review-profile .email { font-size: 13px; color: var(--uw-text-secondary); }

.review-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--uw-border); font-size: 14px; }
.review-row .k { color: var(--uw-text-secondary); }
.review-row .v { font-weight: 600; }

.bet-amount-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--uw-accent-navy); color: var(--uw-accent-gold);
  font-weight: 700; padding: 8px 16px; border-radius: 999px;
}

.review-table { width: 100%; min-width: 480px; border-collapse: collapse; margin-top: 10px; }
.review-table th { background: var(--uw-accent-navy); color: #fff; font-size: 11px; text-transform: uppercase; padding: 10px 8px; }
.review-table td { padding: 9px 8px; border-bottom: 1px solid var(--uw-border); font-size: 13px; text-align: center; }
.review-table .pick-mark { color: var(--uw-accent-red); font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 13px 26px;
  border-radius: var(--uw-radius-md);
  font-size: 14px; font-weight: 700;
  border: none; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-secondary { background: #eef1f6; color: var(--uw-text-primary); }
.btn-secondary:hover:not(:disabled) { background: #e3e8f0; }

.btn-navy { background: var(--uw-accent-navy); color: #fff; }
.btn-navy:hover:not(:disabled) { background: #16305c; }

.btn-gold { background: var(--uw-accent-gold); color: #fff; }
.btn-gold:hover:not(:disabled) { background: #e2961a; }

.btn-blue { background: var(--uw-accent-blue); color: #fff; }

.step-actions { display: flex; justify-content: space-between; margin-top: 28px; }

.error-text { color: var(--uw-accent-red); font-size: 13px; margin-top: 6px; }

/* ---------- Submission success modal ---------- */
.success-hero {
  background: var(--uw-accent-navy); color: #fff;
  text-align: center; padding: 36px 28px;
  border-radius: var(--uw-radius-lg);
  margin: -10px -10px 24px;
}
.success-hero .trophy { font-size: 44px; margin-bottom: 10px; }
.success-hero h2 { margin: 0 0 8px; font-family: var(--font-display); text-transform: uppercase; font-size: 24px; }
.success-hero p { margin: 0; color: #c9d6f0; font-size: 14px; }
.success-hero .ref-pill {
  display: inline-block; margin-top: 16px;
  background: rgba(255,255,255,0.12);
  padding: 7px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
}
.modal-success-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #eafaf0; border: 1px solid #c6ecd6;
  border-radius: var(--uw-radius-md);
  padding: 14px 16px; margin-bottom: 22px; font-size: 14px;
}
.share-optional-label {
  font-size: 13px; color: var(--uw-text-secondary);
  margin: 0 0 14px; text-align: center;
}
.share-option {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--uw-border);
  border-radius: var(--uw-radius-md);
  padding: 14px 16px; margin-bottom: 14px; cursor: pointer;
  text-decoration: none; color: inherit;
}
.share-option:hover { border-color: var(--uw-accent-blue); }
.share-option .icon { font-size: 22px; }
.share-option .title { font-weight: 700; font-size: 14px; }
.share-option .desc { font-size: 12px; color: var(--uw-text-secondary); }
.share-option .pill { margin-left: auto; font-size: 11px; background: #eef3fb; padding: 3px 9px; border-radius: 999px; }

.scroll-hint { display: none; }

@media (max-width: 720px) {
  .wizard-card { padding: 24px 20px; }
  .field-row, .bet-grid { grid-template-columns: 1fr; }
  .step-label { display: none; }
  .lang-switch { position: static; display: flex; justify-content: center; margin-bottom: 12px; }
  .scroll-hint {
    display: block;
    font-size: 12px;
    color: var(--uw-text-muted);
    text-align: center;
    margin: -4px 0 10px;
  }
}
