/* ============ Gamers Academy — Fix Your Info ============ */
/* Palette from brand: header navy (photo 6), purple gradient
   lighter top-left → darker bottom-right (photos 3-4) */
:root {
  --header-navy: rgba(38, 37, 51, 0.55);
  --purple-light: #a34ad8;
  --purple-dark: #762d8e;
  --ink: #f5f3f8;
  --ink-dim: rgba(245, 243, 248, 0.65);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --green: #22c55e;
  --red: #ef4444;
  --radius: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: 'Cairo', system-ui, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}
html { background: #16161d; }
body { background: transparent; } /* opaque body would paint OVER the fixed video (z-index -2) */

/* ---------- background ---------- */
.bg-video {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: -2;
  /* blur is baked into the encode — zero per-frame GPU cost */
}
.bg-tint {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 800px at 85% 110%, rgba(118, 45, 142, 0.28), transparent 60%),
    radial-gradient(1000px 700px at 10% -10%, rgba(163, 74, 216, 0.2), transparent 55%),
    linear-gradient(rgba(15, 14, 20, 0.22), rgba(15, 14, 20, 0.38));
}

/* ---------- header ---------- */
.glass-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: 76px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(38, 37, 51, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
.logo {
  height: 52px; width: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(163, 74, 216, 0.5));
}

/* ---------- stage & card ---------- */
.stage {
  min-height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 110px 20px 40px;
}

.card {
  width: min(460px, 100%);
  padding: 40px 34px 34px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(44, 42, 58, 0.92), rgba(30, 28, 40, 0.94));
  border: 1px solid var(--glass-border);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* Marvel Rivals game tag — yellow bolt badge on top of the card */
.game-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 auto 14px;
  padding: 6px 14px;
  font-size: 13px; font-weight: 800;
  color: #f5c400;
  background: rgba(245, 196, 0, 0.1);
  border: 1px solid rgba(245, 196, 0, 0.35);
  border-radius: 999px;
  position: relative; right: 50%; transform: translateX(50%);
}

.title {
  font-size: 28px; font-weight: 800;
  text-align: center;
  background: linear-gradient(120deg, #e9d5ff, #a34ad8 55%, #c084fc);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.subtitle {
  text-align: center;
  color: var(--ink-dim);
  font-size: 16px; font-weight: 600;
  margin-bottom: 28px;
}

/* ---------- fields ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px; font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}
.field input {
  width: 100%;
  padding: 14px 16px;
  font: inherit; font-size: 16px; font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  direction: ltr; text-align: right; /* numbers read naturally */
}
.field input::placeholder { color: rgba(245, 243, 248, 0.35); font-weight: 400; }
.field input:focus {
  border-color: var(--purple-light);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(163, 74, 216, 0.22);
}
.field input.ok    { border-color: rgba(34, 197, 94, 0.7); }
.field input.bad   { border-color: rgba(239, 68, 68, 0.7); }

.hint {
  min-height: 20px;
  font-size: 12.5px; font-weight: 600;
  margin-top: 6px;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.hint.ok  { color: var(--green); }
.hint.bad { color: var(--red); }

/* ---- order preview card(s) under the order field ---- */
.order-preview { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.op-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 196, 0, 0.28);
  animation: op-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.op-item.done { border-color: rgba(34, 197, 94, 0.35); }
@keyframes op-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.op-thumb {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 12px; object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}
.op-thumb-empty { display: grid; place-items: center; font-size: 24px; }
.op-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.op-name { font-weight: 800; font-size: 14px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.op-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.op-chip { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; background: rgba(255, 255, 255, 0.08); }
.op-chip.qty  { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.op-chip.ok   { background: rgba(34, 197, 94, 0.16); color: #86efac; }
.op-chip.wait { background: rgba(245, 196, 0, 0.16); color: #fde68a; }
.op-uid {
  align-self: flex-start; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--ink, #f4f1f8); background: rgba(245, 196, 0, 0.1);
  border: 1px dashed rgba(245, 196, 0, 0.45); border-radius: 10px; padding: 4px 10px;
}
.op-uid b { font-weight: 800; letter-spacing: 0.3px; }
.op-uid:hover { background: rgba(245, 196, 0, 0.2); }

/* ---------- "where is my UID" helper ---------- */
.uid-help {
  margin: -6px 0 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.uid-help summary {
  padding: 11px 14px;
  font-size: 13.5px; font-weight: 700;
  color: var(--ink-dim);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s, background 0.2s;
}
.uid-help summary::-webkit-details-marker { display: none; }
.uid-help summary:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.uid-help[open] summary { color: #f5c400; }
.uid-help ol {
  padding: 2px 30px 14px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-dim);
  line-height: 1.9;
}
.uid-help strong { color: var(--ink); }

/* ---------- button ---------- */
.submit-btn {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  font: inherit; font-size: 17px; font-weight: 800;
  color: #fff;
  border: none; border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple-dark) 100%);
  box-shadow: 0 10px 30px rgba(118, 45, 142, 0.45), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  position: relative;
}
.submit-btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(118, 45, 142, 0.55), inset 0 1px 0 rgba(255,255,255,0.3); }
.submit-btn:not(:disabled):active { transform: translateY(0) scale(0.98); }
.submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute; inset-inline-start: 18px; top: 50%; margin-top: -10px;
}
.submit-btn.loading .btn-spinner { display: block; }
.submit-btn.loading .btn-label { opacity: 0.75; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- success ---------- */
.success-box {
  margin-top: 6px;
  padding: 28px 22px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08));
  border: 1.5px solid rgba(34, 197, 94, 0.45);
  box-shadow: 0 12px 36px rgba(34, 197, 94, 0.18), inset 0 1px 0 rgba(255,255,255,0.15);
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.check { width: 64px; height: 64px; margin-bottom: 10px; }
.check-circle {
  stroke: var(--green); stroke-width: 2.5;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw 0.6s ease-out forwards;
}
.check-mark {
  stroke: var(--green); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: draw 0.4s 0.45s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.success-title { font-size: 22px; font-weight: 800; color: #86efac; }
.success-sub   { font-size: 13.5px; font-weight: 600; color: var(--ink-dim); margin-top: 6px; }

/* ---------- footer ---------- */
.foot {
  margin-top: 26px;
  font-size: 12px; font-weight: 600;
  color: rgba(245, 243, 248, 0.4);
  letter-spacing: 0.4px;
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  /* phones skip the video entirely — static gradient, zero battery/data cost */
  .bg-video { display: none; }
  html { background:
    radial-gradient(120vw 80vh at 85% 110%, rgba(118, 45, 142, 0.4), transparent 60%),
    radial-gradient(100vw 70vh at 10% -10%, rgba(163, 74, 216, 0.28), transparent 55%),
    #16161d; }
  .glass-header { height: 64px; }
  .logo { height: 44px; width: 44px; }
  .stage { padding: 92px 14px 28px calc(14px + env(safe-area-inset-left)); }
}
@media (max-width: 480px) {
  .card { padding: 28px 20px 24px; }
  .title { font-size: 23px; }
  .subtitle { font-size: 14.5px; margin-bottom: 22px; }
  .field input { font-size: 16px; } /* ≥16px keeps iOS from zoom-jumping into the field */
  .submit-btn { padding: 14px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-video { display: none; }
  .card, .success-box { animation: none; }
}
