@font-face { font-family: Pusia; src: url(Pusia-Bold.otf) format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --sky1: #6fd3ff;
  --sky2: #2f95ff;
  --sky3: #2563eb;
  --card: #ffffff;
  --soft: #eef5ff;
  --line: #cfe0fb;
  --text: #17224a;
  --muted: #5e6f96;
  --blue: #1f6bff;
  --yellow: #ffd21f;
  --green: #22c55e;
  --red: #ff4d5e;
  --orange: #ff9f1a;
  --purple: #8b5cf6;
  --radius: 20px;
  --shadow: 0 6px 0 rgba(17, 46, 120, .18), 0 14px 30px rgba(17, 46, 120, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); display: flex; flex-direction: column;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--sky2);
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 22px, rgba(255,255,255,0) 22px 44px),
    radial-gradient(900px 500px at 15% -10%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 45%, var(--sky3) 100%);
  background-attachment: fixed;
}
a { color: var(--blue); font-weight: 600; }

/* Brawl-style title text: yellow or white fill, thick black outline, drop shadow */
h1, .brand span, .creator-code, .btn, .section-title, .tabs button, .pill, .stats b, .summary b, .big-gems, .tier-gems {
  font-family: Pusia, system-ui, sans-serif; font-weight: 700; letter-spacing: .02em;
}
h1 {
  font-size: clamp(32px, 8.5vw, 52px); margin: 10px 0 6px; line-height: 1.05; color: var(--yellow);
  -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 0 4px 0 #000;
}
h2 { font-size: 21px; margin: 0 0 10px; font-weight: 800; }
.section-title { margin: 26px 4px 12px; font-size: 26px; color: #fff; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 3px 0 #000; }

.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; background: linear-gradient(180deg, #2f7dff, #1d5fe0); border-bottom: 3px solid #0d3aa6;
  box-shadow: 0 4px 14px rgba(13, 58, 166, .35);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 12px; border: 2px solid #000; }
.brand span { font-size: 22px; color: var(--yellow); -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 2px 0 #000; }
nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
nav a { color: #dbe8ff; text-decoration: none; font-weight: 700; }
nav a.on { color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 3px; text-decoration-color: var(--yellow); }
nav .link { color: #dbe8ff; }

main { width: 100%; min-width: 0; max-width: 780px; margin: 0 auto; padding: 18px 16px; flex: 1; }
.loading { text-align: center; color: #fff; font-weight: 700; padding: 60px 0; }
.foot { text-align: center; color: #e6f0ff; font-size: 13px; padding: 24px 16px 32px; }
.foot a { margin-left: 6px; color: var(--yellow); }

.hero { text-align: center; padding: 14px 0 4px; }
.hero img { border-radius: 32px; border: 4px solid #000; box-shadow: 0 8px 0 #000, 0 18px 40px rgba(0,0,0,.25); transform: rotate(-3deg); }
.lead { font-size: 19px; max-width: 540px; margin: 6px auto 0; color: #fff; font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.35); }

.card { background: var(--card); border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow); border: 3px solid #0d3aa6; }
.card.narrow { max-width: 460px; margin: 18px auto; }
.muted { color: var(--muted); }

label { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
input {
  width: 100%; font: inherit; color: var(--text); background: var(--soft); border: 3px solid var(--line); border-radius: 14px; padding: 12px 14px; outline: none;
}
input::placeholder { color: #93a3c4; }
input:focus { border-color: var(--blue); background: #fff; }
.code-input { font-size: 30px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }

.btn {
  display: inline-block; width: 100%; margin-top: 16px; padding: 13px 18px; font-size: 19px; color: #fff; cursor: pointer; text-transform: uppercase;
  background: linear-gradient(180deg, #ffe45a 0%, var(--yellow) 55%, #f5b800 100%); border: 3px solid #000; border-radius: 14px; box-shadow: 0 5px 0 #000;
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 2px 0 #000;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #000; }
.btn:disabled { opacity: .65; cursor: progress; }
.btn.small { width: auto; margin: 0; padding: 9px 14px; font-size: 15px; box-shadow: 0 4px 0 #000; }
.btn.green { background: linear-gradient(180deg, #7cf29b, var(--green) 60%, #16a34a); }
.btn.red { background: linear-gradient(180deg, #ff8f99, var(--red) 60%, #e11d48); }
.btn.ghost { background: linear-gradient(180deg, #7fb2ff, var(--blue) 60%, #1450d6); }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; padding: 8px 0; text-decoration: underline; }
#f-code .link { display: block; margin: 10px auto 0; }

.msg { min-height: 1.4em; margin: 12px 0 0; font-weight: 700; }
.msg.err { color: #e11d48; }
.msg.ok { color: #15803d; }

.steps { display: grid; gap: 10px; max-width: 460px; margin: 0 auto; }
.steps div { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.92); border: 3px solid #0d3aa6; border-radius: 16px; padding: 10px 14px; font-weight: 600; }
.steps b { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); border: 3px solid #000; color: #000; font-family: Pusia, sans-serif; }

/* rewards preview on the login page */
.promo { text-align: center; background: linear-gradient(180deg, #fff6c7, #ffe27a); border-color: #000; }
.promo .big-gems { display: block; font-size: clamp(40px, 11vw, 60px); color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 0 4px 0 #000; line-height: 1.1; }
.promo p { margin: 4px 0 12px; font-weight: 700; }
.promo .muted { color: #6b5a12; }
.tier-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.tier-strip div { background: #fff; border: 3px solid #000; border-radius: 14px; padding: 8px 4px; }
.tier-strip span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.tier-gems { font-size: 17px; color: var(--purple); white-space: nowrap; }

.profile { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.profile .name { font-size: 24px; font-weight: 900; }
.stats { display: flex; gap: 10px; }
.stats div { text-align: center; background: var(--soft); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; min-width: 90px; }
.stats b { display: block; font-size: 22px; color: var(--blue); }
.stats div:last-child b { color: var(--purple); }
.stats span { font-size: 12px; color: var(--muted); font-weight: 700; }

.code-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(180deg, #fff6c7, #ffe27a); border-color: #000; }
.code-card .muted { color: #6b5a12; font-weight: 700; }
.creator-code { font-size: 38px; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 0 3px 0 #000; user-select: all; }
.wide { flex-basis: 100%; margin: 0; font-size: 14px; }

.row { display: flex; gap: 10px; }
.row input { flex: 1; min-width: 0; }
.row .btn { width: auto; margin: 0; }
.rules { font-size: 14px; margin: 10px 0 0; }

.list { display: grid; gap: 14px; }
.empty { color: var(--muted); font-weight: 700; text-align: center; padding: 26px; background: rgba(255,255,255,.92); border: 3px dashed #0d3aa6; border-radius: var(--radius); }
.video { background: var(--card); border: 3px solid #0d3aa6; border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.video .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.video .title { font-weight: 800; word-break: break-word; }
.video .title a { color: var(--text); text-decoration-color: var(--blue); }
.video .meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.video .nums { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.video .nums b { font-size: 22px; }
.video .note { font-size: 14px; background: var(--soft); border-left: 4px solid var(--blue); border-radius: 10px; padding: 8px 10px; }
.video .warn { color: #c2410c; font-size: 14px; font-weight: 700; }
.video .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.platform { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 8px; background: #000; color: #fff; }
.platform.tiktok { color: #25f4ee; }
.platform.youtube { background: #ff0033; }
.pill { font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 2px solid #000; color: #fff; -webkit-text-stroke: 1px #000; paint-order: stroke fill; }
.pill.pending { background: var(--orange); }
.pill.approved { background: var(--green); }
.pill.frozen { background: #7aa7ff; }
.pill.rejected { background: var(--red); }
.gems { color: var(--purple); font-weight: 900; }
.gems::after { content: " 💎"; }
.bar { height: 14px; background: #e3ecfb; border: 2px solid #0d3aa6; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), #ffb800 50%, var(--green)); border-radius: 99px; }
.next { font-size: 13px; color: var(--muted); font-weight: 600; }

.tiers { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.tiers th { text-align: left; color: var(--muted); font-weight: 700; font-size: 14px; padding: 0 12px; }
.tiers td { padding: 10px 12px; background: var(--soft); font-weight: 700; }
.tiers td:first-child { border-radius: 12px 0 0 12px; }
.tiers td:last-child { border-radius: 0 12px 12px 0; font-weight: 900; color: var(--purple); text-align: right; }
.tiers th:last-child { text-align: right; }

.summary { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.summary b { font-size: 26px; color: var(--blue); display: block; }
.summary div:last-child b { color: var(--purple); }
.summary span { font-weight: 700; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; }
.tabs button { flex: none; font-size: 14px; padding: 8px 14px; border-radius: 12px; border: 3px solid #0d3aa6; background: #fff; color: var(--text); cursor: pointer; }
.tabs button.on { background: var(--yellow); border-color: #000; box-shadow: 0 3px 0 #000; }

@media (max-width: 520px) {
  .top { padding: 8px 12px; }
  .brand span { display: none; }
  nav { gap: 14px; }
  .row { flex-direction: column; }
  .row .btn { width: 100%; }
  .stats { width: 100%; }
  .stats div { flex: 1; min-width: 0; padding: 8px 6px; }
  .creator-code { font-size: 32px; }
  .card { padding: 16px; }
}

/* creator level */
.level-card { background: linear-gradient(180deg, #efe7ff, #d9c8ff); border-color: #000; }
.level-head { display: flex; align-items: center; gap: 14px; }
.level-badge {
  flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; border: 3px solid #000; box-shadow: 0 4px 0 #000;
  background: linear-gradient(180deg, #b892ff, var(--purple)); color: #fff; font: 700 34px/1 Pusia, sans-serif; -webkit-text-stroke: 2px #000; paint-order: stroke fill;
}
.level-title { font: 700 22px/1.1 Pusia, sans-serif; letter-spacing: .02em; }
.level-rate { font-weight: 800; color: #5b21b6; margin-top: 2px; }
.level-next { margin-top: 14px; display: grid; gap: 10px; }
.next-title { font-weight: 800; }
.req-text { display: flex; gap: 8px; align-items: baseline; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.req-text b { margin-left: auto; }
.req-text .ok { color: #15803d; }
.tiers tr.cur td { background: #fff3b0; }
.tier-strip span + span { margin-top: 2px; }
.tiers td:first-child .lvl { display: block; font-weight: 900; white-space: nowrap; }
.tiers td:first-child small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; }
.tiers td:last-child .rate { display: block; white-space: nowrap; }
.tiers td:last-child small { display: block; color: var(--muted); font-weight: 700; white-space: nowrap; }
