/* Handel Store — Bulkster-style: near-black, violet cards, gold stars, emoji tiles */

:root {
  --bg: #0e0c15;
  --card: #1d1930;
  --card-2: #272044;
  --tile: #2a2447;
  --inset: #161226;
  --line: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --muted: #8f8aa8;
  --violet: #8b6cf5;
  --violet-soft: #c9b8ff;
  --grad: linear-gradient(180deg, #b7a4ff 0%, #7c5cf0 100%);
  --gold: #ffc94d;
  --green: #35c46f;
  --red: #ef5b5b;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, Roboto, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, "Roboto Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background:
    radial-gradient(80% 45% at 85% -10%, rgba(124, 92, 240, 0.16), transparent 65%),
    radial-gradient(60% 35% at 8% -5%, rgba(53, 196, 111, 0.08), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

button { user-select: none; -webkit-user-select: none; }

/* One centered phone-width column on every device */
.topbar, .screen {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.pcard, .btn, .lic, .amt, .tab, .btn-plus, .task, .ocard, .banner-ref, .tile-btn, .ref-row {
  transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease,
              box-shadow 0.16s ease, color 0.16s ease, filter 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
  .pcard:hover { background: var(--card-2); transform: translateY(-2px); }
  .btn-grad:hover, .btn-plus:hover, .tab.center:hover .center-ic { filter: brightness(1.08); }
  .btn-dark:hover, .btn-inset:hover { background: var(--card-2); }
  .btn-ghost:hover { color: var(--text); }
  .lic:hover:not(.sel) { border-color: rgba(255, 255, 255, 0.12); }
  .amt:hover:not(.sel) { background: var(--card-2); }
  .tab:hover:not(.active):not(.center) { color: var(--text); }
  .banner-ref:hover { background: rgba(53, 196, 111, 0.16); }
  .ref-row:hover { background: var(--card-2); }
  .addr:hover b { text-decoration: underline; }
  .profile-id:hover { color: var(--text); }
  .tile-btn:hover { filter: brightness(1.12); }
}

/* --- header ------------------------------------------------------------------ */

.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 10px;
}
.ava {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #9db1ff, #6a5cf0);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  background-size: cover; background-position: center;
  cursor: pointer;
}
.who { min-width: 0; }
.who-name { font-weight: 800; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 1px; }

.wallet-pill {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--inset);
  border: 1px solid rgba(255, 201, 77, 0.25);
  border-radius: 99px; padding: 5px 6px 5px 13px;
  font-family: var(--mono); font-weight: 700; font-size: 15px;
}
.wallet-pill .star { font-size: 13px; }
.btn-plus {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 19px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(124, 92, 240, 0.45);
}
.btn-plus:active { transform: scale(0.94); }

/* --- layout -------------------------------------------------------------------- */

.screen { position: relative; z-index: 1; padding: 4px 16px calc(118px + env(safe-area-inset-bottom)); }

.h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin: 10px 0 4px;
}
.h1.gold {
  background: linear-gradient(180deg, #ffe9b3, #f0b840);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-label { font-size: 16.5px; font-weight: 800; margin: 20px 0 12px; }

/* --- referral banner --------------------------------------------------------------- */

.banner-ref {
  display: flex; align-items: center; gap: 12px;
  background: rgba(53, 196, 111, 0.11);
  border: 1px solid rgba(53, 196, 111, 0.30);
  border-radius: 18px; padding: 13px 14px; margin-top: 12px;
  cursor: pointer; text-align: left; width: 100%; color: inherit; font: inherit;
}
.banner-ref .ic { font-size: 28px; flex: none; }
.banner-ref .t { font-weight: 800; font-size: 14px; }
.banner-ref .s { color: #9fd8b6; font-size: 12px; margin-top: 3px; line-height: 1.4; }
.banner-ref .go {
  margin-left: auto; flex: none;
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(53, 196, 111, 0.20); color: #6fe0a0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* --- product cards -------------------------------------------------------------------- */

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

.pcard {
  border: 1px solid var(--line); padding: 14px 12px 12px; text-align: center; cursor: pointer;
  color: inherit; font: inherit;
  background: var(--card); border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  position: relative;
}
.pcard:active { transform: scale(0.985); }

.ptile {
  width: 96px; height: 96px; border-radius: 24px;
  background: var(--tile);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.ptile .glow-spot {
  position: absolute; inset: 20%;
  border-radius: 50%; filter: blur(18px); opacity: 0.45;
}
.ptile .emoji { position: relative; font-size: 46px; line-height: 1; }

.pcard-name { font-weight: 800; font-size: 14px; line-height: 1.3; }
.pcard-sub { color: var(--muted); font-size: 11.5px; margin-top: -5px; }

.price-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  border: 1px solid rgba(255, 201, 77, 0.35);
  background: rgba(255, 201, 77, 0.06);
  color: var(--gold);
  border-radius: 99px; padding: 5px 12px;
}
.price-pill .was { color: var(--muted); text-decoration: line-through; font-size: 11px; }

.badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 10.5px; font-weight: 800;
  color: #3a2c00; background: var(--gold);
  border-radius: 8px; padding: 3px 7px;
}

.tile-btn {
  width: 100%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff;
  border-radius: 14px; padding: 12px 0;
  font: 800 13px var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 5px 16px rgba(124, 92, 240, 0.35);
}
.tile-btn:active { transform: scale(0.97); }

/* --- product page ---------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  padding: 30px 16px; margin-top: 8px;
}
.hero .ptile { width: 128px; height: 128px; border-radius: 30px; }
.hero .ptile .emoji { font-size: 64px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  font-size: 12px; font-weight: 700; color: var(--violet-soft);
  background: rgba(139, 108, 245, 0.14);
  border-radius: 9px; padding: 5px 10px;
}
.chip.dim { color: var(--muted); background: var(--card); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 15px; margin-top: 12px; }
.card h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }

.lic {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--inset); border: 1.5px solid transparent; border-radius: 14px;
  padding: 13px 14px; margin-bottom: 8px; cursor: pointer; color: inherit; font: inherit; text-align: left;
}
.lic:last-child { margin-bottom: 0; }
.lic.sel { border-color: var(--violet); background: rgba(139, 108, 245, 0.10); }
.lic-label { flex: 1; font-weight: 700; font-size: 14.5px; }
.lic-price { font-family: var(--mono); font-weight: 700; font-size: 14.5px; color: var(--gold); }
.lic-price .was { color: var(--muted); text-decoration: line-through; font-size: 11.5px; margin-right: 6px; }

.desc { font-size: 14px; line-height: 1.55; color: #c9c4dc; white-space: pre-wrap; }

/* --- buttons ------------------------------------------------------------------------------- */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: 15px; padding: 15px;
  font: 800 15px var(--sans); color: #fff; cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn-grad { background: var(--grad); box-shadow: 0 6px 20px rgba(124, 92, 240, 0.35); }
.btn-dark { background: var(--card-2); font-weight: 700; }
.btn-inset { background: var(--inset); border: 1px solid var(--line); font-weight: 700; }
.btn-gold {
  background: transparent; border: 1.5px solid rgba(255, 201, 77, 0.45);
  color: var(--gold); font-weight: 800;
}
.btn-ghost { background: none; color: var(--muted); font-weight: 600; text-decoration: underline; padding: 10px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.actions { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* --- payment / topup -------------------------------------------------------------------------- */

.pay-head { text-align: center; margin-top: 18px; }
.pay-label { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pay-amount { font-family: var(--mono); font-size: 42px; font-weight: 700; margin-top: 6px; }
.pay-amount small { font-size: 18px; color: var(--muted); font-weight: 500; }
.pay-meta { margin-top: 4px; font-size: 13.5px; color: var(--muted); }

.ticket-row { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.ticket-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ticket-row .k { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.ticket-row .v { margin-top: 5px; font-size: 14.5px; }

.addr { font-family: var(--mono); font-size: 14.5px; line-height: 1.7; word-break: break-all; cursor: pointer; }
.addr b { color: var(--violet-soft); }

.warn {
  margin-top: 12px; padding: 12px 14px; border-radius: 16px;
  background: rgba(239, 91, 91, 0.10);
  color: #f2a5a5; font-size: 13px; line-height: 1.45;
}
.steps { margin-top: 14px; font-size: 13.5px; color: var(--muted); line-height: 1.85; }
.steps b { color: var(--text); }

.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.amt {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 17px 0; text-align: center; cursor: pointer; color: inherit;
  font: 700 16px var(--mono);
}
.amt.sel { border-color: var(--violet); background: rgba(139, 108, 245, 0.10); }
.amt-custom {
  margin-top: 10px; width: 100%;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 16px; color: var(--text); font: 700 15px var(--sans); outline: none;
}
.amt-custom:focus { border-color: var(--violet); }
.amt-custom::placeholder { color: var(--muted); font-weight: 600; }

/* --- profile ------------------------------------------------------------------------------------ */

.profile-hero { text-align: center; padding-top: 18px; }
.ava-big {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto;
  background: linear-gradient(135deg, #9db1ff, #6a5cf0);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 40px; color: #fff;
  background-size: cover; background-position: center;
  box-shadow: 0 0 0 3px rgba(139, 108, 245, 0.65), 0 0 34px rgba(124, 92, 240, 0.45);
  position: relative;
}
.ava-wrap { position: relative; width: 96px; margin: 0 auto; }
.online-dot {
  position: absolute; right: 4px; bottom: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--green); border: 3px solid var(--bg);
}
.profile-name { font-size: 22px; font-weight: 800; margin-top: 14px; }
.profile-sub { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.profile-id {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); border-radius: 12px; padding: 8px 14px;
  font: 600 12.5px var(--sans);
}

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 14px; text-align: left;
}
.tile .k {
  color: var(--muted); font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 5px;
}
.tile .v { font-family: var(--mono); font-size: 26px; font-weight: 700; margin: 8px 0 10px; }
.tile .btn { padding: 10px; border-radius: 12px; font-size: 13px; }

.ref-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 13px 14px; margin-top: 12px;
  cursor: pointer; color: inherit; font: inherit; text-align: left;
}
.ref-row .ic {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: rgba(139, 108, 245, 0.16);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.ref-row .t { font-weight: 800; font-size: 14.5px; }
.ref-row .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ref-row .chev { margin-left: auto; color: var(--muted); font-size: 16px; }

.seg {
  display: flex; background: var(--card); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px; margin-top: 14px;
}
.seg button {
  flex: 1; border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 700 14px var(--sans); padding: 11px 0; border-radius: 99px;
}
.seg button.active { background: var(--card-2); color: var(--text); }

.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx-ic {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  background: var(--inset);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.tx-main { flex: 1; min-width: 0; }
.tx-name { font-weight: 700; font-size: 14px; }
.tx-date { color: var(--muted); font-size: 12px; margin-top: 2px; }
.tx-amt { font-family: var(--mono); font-weight: 700; font-size: 14.5px; }
.tx-amt.plus { color: var(--green); }
.tx-amt.minus { color: var(--text); }

/* --- referral screen ------------------------------------------------------------------------------ */

.ref-hero { text-align: center; padding: 24px 0 4px; }
.ref-hero .big { font-size: 52px; }
.ref-hero h2 { font-size: 21px; font-weight: 800; margin-top: 10px; }
.ref-hero p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin-top: 8px; }
.ref-link {
  font-family: var(--mono); font-size: 13px; word-break: break-all;
  color: var(--violet-soft); cursor: pointer;
}

/* --- orders -------------------------------------------------------------------------------------- */

.ocard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px; margin-top: 10px;
  display: flex; gap: 12px; align-items: center;
}
.o-ic {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  background: var(--tile); display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.ocard-main { flex: 1; min-width: 0; }
.ocard-name { font-weight: 800; font-size: 15px; }
.ocard-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.ocard-price { font-family: var(--mono); font-weight: 700; color: var(--gold); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.st-completed { color: var(--green); }        .st-completed .dot { background: var(--green); }
.st-paid { color: #9d8bff; }                  .st-paid .dot { background: #9d8bff; }
.st-awaiting_confirmation { color: var(--gold); } .st-awaiting_confirmation .dot { background: var(--gold); }
.st-pending_payment, .st-expired { color: var(--muted); }
.st-pending_payment .dot, .st-expired .dot { background: var(--muted); }

/* --- tasks -------------------------------------------------------------------------------------- */

.progress-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px; margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.progress-card .k { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.progress-card .v { font-size: 26px; font-weight: 800; margin-top: 4px; }
.progress-card .v small { color: var(--muted); font-size: 15px; font-weight: 700; }
.reward-pill {
  display: flex; align-items: center; gap: 6px; flex: none;
  background: rgba(255, 201, 77, 0.10); border: 1px solid rgba(255, 201, 77, 0.30);
  color: var(--gold);
  border-radius: 99px; padding: 8px 14px;
  font: 800 13px var(--sans);
}
.progress-bars { display: flex; gap: 6px; margin-top: 10px; }
.progress-bars span { flex: 1; height: 4px; border-radius: 4px; background: var(--card-2); }
.progress-bars span.on { background: var(--gold); }

.task {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 15px; margin-top: 12px;
}
.task-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-title { font-weight: 800; font-size: 15px; }
.task-reward {
  font: 800 12px var(--sans); color: #2d1e00;
  background: var(--gold); border-radius: 8px; padding: 3px 8px;
}
.task-desc { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.45; }
.task .btn { margin-top: 12px; padding: 13px; border-radius: 13px; }
.task.done { opacity: 0.55; }

/* --- states ---------------------------------------------------------------------------------------- */

.empty {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 44px 24px; text-align: center; color: var(--muted);
  font-size: 14.5px; line-height: 1.6; margin-top: 14px;
}
.empty .big { font-size: 40px; margin-bottom: 12px; }
.empty b { color: var(--text); }

.skeleton { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.sk-card { height: 210px; border-radius: 22px; background: var(--card); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .sk-card { animation: none; } }

/* --- floating dock ------------------------------------------------------------------------------------ */

.dock-wrap {
  position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 0; right: 0; z-index: 10;
  display: flex; justify-content: center; padding: 0 16px;
}
.dock {
  display: flex; align-items: flex-end; gap: 2px;
  background: rgba(24, 20, 38, 0.95); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 24px; padding: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 66px; padding: 8px 8px; border: 1.5px solid transparent; border-radius: 17px;
  background: none; color: #7d7796; font: 700 10.5px var(--sans); cursor: pointer;
}
.tab svg { width: 21px; height: 21px; fill: currentColor; }
.tab.active:not(.center) {
  border-color: rgba(139, 108, 245, 0.45);
  background: rgba(139, 108, 245, 0.10);
  color: var(--violet-soft);
}

.tab.center { padding-top: 0; margin-top: -26px; border: 0; background: none; }
.center-ic {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(124, 92, 240, 0.55), 0 0 0 5px rgba(14, 12, 21, 0.9);
}
.center-ic svg { width: 26px; height: 26px; fill: #fff; }
.tab.center.active { color: var(--violet-soft); }
.tab.center.active .center-ic { box-shadow: 0 8px 28px rgba(124, 92, 240, 0.8), 0 0 0 5px rgba(14, 12, 21, 0.9); }

:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }

/* --- Reviews --------------------------------------------------------------- */

.rev { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rev:last-child { border-bottom: none; padding-bottom: 2px; }
.rev-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rev-author { font-weight: 700; font-size: 14px; }
.rev-mine {
  font-size: 10px; font-weight: 700; color: var(--violet-soft);
  background: rgba(139, 108, 245, 0.18); border-radius: 6px; padding: 2px 6px;
  vertical-align: 1px;
}
.rev-stars { color: var(--gold); font-size: 13px; letter-spacing: 2px; white-space: nowrap; }
.rev-prod { color: var(--violet-soft); font-size: 12px; font-weight: 700; margin-top: 3px; }
.rev-text { margin-top: 5px; font-size: 13.5px; line-height: 1.5; }
.rev-meta { margin-top: 5px; font-size: 11.5px; color: var(--muted); }

.star-pick { display: flex; justify-content: center; gap: 10px; margin: 12px 0 2px; }
.star-pick button {
  font-size: 30px; line-height: 1; background: none; border: none;
  color: var(--gold); opacity: 0.28; cursor: pointer; padding: 2px;
  transition: opacity 0.15s, transform 0.15s;
}
.star-pick button.on { opacity: 1; transform: scale(1.08); }

.rev-ta {
  width: 100%; margin-top: 10px; padding: 13px 14px;
  background: var(--inset); border: 1px solid var(--line); border-radius: 13px;
  color: var(--text); font-family: var(--sans); font-size: 15px; font-weight: 600;
  line-height: 1.45; resize: none;
}
.rev-ta:focus { border-color: var(--violet); outline: none; }
.rev-ta::placeholder { color: var(--muted); font-weight: 600; }

/* --- Motion (DurgerKing-style smoothness) ----------------------------------- */

/* Staggered screen entrance: each top-level block fades up in cascade */
.ai {
  animation: screenIn 0.4s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
  animation-delay: var(--d, 0ms);
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
}

/* Balance pill pops when points change */
.wallet-pill.pop { animation: pillPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pillPop { 40% { transform: scale(1.14); } }

/* Product hero: emoji gently floats, glow breathes */
.hero .emoji { animation: floaty 3.4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-7px); } }
.hero .glow-spot { animation: glowPulse 3.4s ease-in-out infinite; }
@keyframes glowPulse { 50% { opacity: 0.65; } }

/* Press feedback on interactive rows */
.lic:active, .ref-row:active, .banner-ref:active { transform: scale(0.98); }

/* Dock: springy icon on tab switch */
.tab svg, .center-ic { transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tab.active svg { transform: translateY(-2px) scale(1.12); }
.tab.center:active .center-ic { transform: scale(0.9); }

/* Skeleton: shimmer sweep instead of plain blink */
.sk-card {
  background: linear-gradient(100deg, var(--card) 40%, var(--card-2) 50%, var(--card) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.seg button { transition: background 0.16s ease, color 0.16s ease; }

@media (prefers-reduced-motion: reduce) {
  .ai, .wallet-pill.pop, .hero .emoji, .hero .glow-spot, .sk-card { animation: none; }
}

/* --- Purchase-first layout -------------------------------------------------- */

.wallet-pill { cursor: pointer; }

/* Slim bonus teaser under the product grid (replaces the big top banner) */
.bonus-strip {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin-top: 18px; padding: 13px 16px;
  background: none; border: 1px dashed rgba(255, 201, 77, 0.35); border-radius: 14px;
  color: var(--muted); font: 600 12.5px var(--sans); text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.bonus-strip .go { margin-left: auto; color: var(--gold); }
.bonus-strip:active { transform: scale(0.98); }

/* Collapsed promo-code entry on the product page */
.promo-toggle {
  display: block; width: 100%; margin-top: 14px;
  background: none; border: 0; padding: 4px 2px;
  color: var(--muted); font: 600 12.5px var(--sans); text-align: center;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-style: dotted;
  cursor: pointer;
}
.promo-card { margin-top: 10px; }

/* --- Review product filters -------------------------------------------------- */

.rev-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.rev-filters::-webkit-scrollbar { display: none; }
.fchip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font: 700 12px var(--sans); cursor: pointer; white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.fchip.sel { color: var(--gold); border-color: rgba(255, 201, 77, 0.5); background: rgba(255, 201, 77, 0.08); }

/* --- My orders: pay/cancel + review CTA -------------------------------------- */

.o-actions { display: flex; gap: 8px; margin: 8px 0 6px; }
.o-actions .btn { padding: 12px; font-size: 13.5px; }
.o-review { margin-top: 9px; padding: 9px 12px; font-size: 12.5px; border-radius: 11px; }

/* --- Focused checkout: no dock on the pay screen ----------------------------- */

body.pay-mode .dock-wrap { display: none; }
body.pay-mode .screen { padding-bottom: calc(36px + env(safe-area-inset-bottom)); }

/* --- Crypto invoice screen (BitPay/CryptoBot-style) -------------------------- */

.pay-copy-hint { color: var(--muted); font-size: 11px; margin-top: 2px; }
.pay-amount { cursor: pointer; }

.pay-status {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 13px 14px;
  background: rgba(53, 196, 111, 0.08);
  border: 1px solid rgba(53, 196, 111, 0.25);
  border-radius: 14px;
  color: #bfe9cf; font-size: 13px; line-height: 1.45; text-align: left;
}
.pay-status .spin {
  flex: 0 0 auto; width: 18px; height: 18px;
  border: 2.5px solid rgba(53, 196, 111, 0.25);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.qr-card { text-align: center; }
.qr-box {
  display: inline-block; background: #fff; border-radius: 16px;
  padding: 12px; margin: 4px auto 10px; line-height: 0;
}
.qr-box svg { width: 168px; height: 168px; display: block; }
.net-chip {
  display: inline-block; margin: 0 auto 10px;
  font: 700 11.5px var(--mono); letter-spacing: 0.04em;
  color: var(--violet-soft); background: rgba(139, 108, 245, 0.14);
  border: 1px solid rgba(139, 108, 245, 0.3);
  border-radius: 99px; padding: 5px 12px;
}

.warn.gold {
  background: rgba(255, 201, 77, 0.07);
  border-color: rgba(255, 201, 77, 0.3);
  color: #ecd9a8;
}

@media (prefers-reduced-motion: reduce) { .pay-status .spin { animation: none; } }

/* --- Data subscription cabinet ----------------------------------------------- */

.sub-card.ended { opacity: 0.75; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.sub-badge {
  font: 700 11px var(--sans); color: var(--green);
  background: rgba(53, 196, 111, 0.12); border: 1px solid rgba(53, 196, 111, 0.3);
  border-radius: 99px; padding: 4px 10px; white-space: nowrap;
}
.sub-badge.off { color: var(--muted); background: var(--inset); border-color: var(--line); }
.sub-dates { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.sub-bar {
  height: 6px; border-radius: 99px; background: var(--inset);
  margin: 10px 0 12px; overflow: hidden;
}
.sub-bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--green), #7ee2a8);
  transition: width 0.6s cubic-bezier(0.22, 0.9, 0.3, 1);
}
.cred-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-top: 6px;
  background: var(--inset); border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer;
}
.cred-row .k { color: var(--muted); font: 700 11px var(--sans); width: 64px; flex: 0 0 auto; }
.cred-row .v { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred-row .cp { margin-left: auto; color: var(--violet-soft); }
.cred-row:active { transform: scale(0.98); }

.o-support { margin-top: 7px; padding: 9px 12px; font-size: 12.5px; border-radius: 11px; }

.o-reviewed {
  margin-top: 8px; padding: 9px 12px; border-radius: 11px;
  font: 700 12.5px var(--sans); color: var(--green); text-align: center;
  background: rgba(53, 196, 111, 0.1); border: 1px solid rgba(53, 196, 111, 0.28);
}

/* --- My orders: cohesive pending card + subtle support link ------------------ */

.opend { padding: 14px; }
.opend-top { display: flex; align-items: center; gap: 12px; }
.opend-top .ocard-main { flex: 1; min-width: 0; }
.opend > .btn-grad { margin-top: 13px; }
.opend-foot { display: flex; gap: 8px; margin-top: 8px; }
.opend-foot .btn { flex: 1; padding: 12px; font-size: 13.5px; }

.o-support-link {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; cursor: pointer;
  color: var(--muted); font: 600 12.5px var(--sans);
  padding: 8px 2px; margin-top: 6px;
}
.o-support-link:active { opacity: 0.55; }
.opend-foot .o-support-link { justify-content: center; padding: 12px; }

/* --- Completed order: cohesive card ------------------------------------------ */
.ocard-done { padding: 14px; }
.ocard-done > .o-review { margin-top: 12px; }
.ocard-done > .o-reviewed { margin-top: 12px; }
.ocard-done > .o-support-link { display: block; margin-top: 6px; }

/* --- Compact order rows with tap-to-expand ---------------------------------- */

.orow {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 16px; margin-top: 10px; overflow: hidden;
}
.orow-tap {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: 0; cursor: pointer; padding: 13px 14px;
  text-align: left; color: inherit; font: inherit;
  transition: background 0.16s ease;
}
.orow-tap:active { background: var(--card-2); }
.orow-ic { font-size: 20px; flex: 0 0 auto; }
.orow-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.orow-name { font-weight: 800; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orow-meta { color: var(--muted); font-size: 11.5px; margin-top: 4px; display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orow-meta .status { font-size: 11.5px; }
.orow-price { font-family: var(--mono); font-weight: 700; color: var(--gold); font-size: 14px; flex: 0 0 auto; }
.orow-chev {
  color: var(--muted); font-size: 18px; flex: 0 0 auto; line-height: 1;
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.orow.open .orow-chev { transform: rotate(90deg); }
.orow-actions {
  max-height: 0; overflow: hidden; padding: 0 14px;
  transition: max-height 0.28s ease;
}
.orow.open .orow-actions { max-height: 200px; padding-bottom: 12px; }
.orow-actions .o-review { margin-top: 4px; }
.orow-actions .o-reviewed { margin-top: 4px; }
.orow-actions .o-support-link { display: block; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { .orow-actions, .orow-chev { transition: none; } }

/* --- Soft pill buttons inside orders ----------------------------------------- */

.o-pill {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; border-radius: 999px; padding: 12px 16px;
  font: 700 13.5px var(--sans); cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
}
.o-pill:active { transform: scale(0.975); filter: brightness(1.1); }
.o-pill-gold { background: rgba(255, 201, 77, 0.12); border-color: rgba(255, 201, 77, 0.32); color: var(--gold); }
.o-pill-mute { background: var(--inset); border-color: var(--line); color: var(--muted); }

.orow-actions .o-pill { margin-top: 8px; }
.orow-actions .o-reviewed { margin-top: 8px; }

/* reviewed badge -> matching green pill */
.o-reviewed { border-radius: 999px; }

/* --- Pending card in pill style ---------------------------------------------- */

.o-pill-primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 5px 16px rgba(124, 92, 240, 0.32);
}
.opend > .o-pill-primary { margin-top: 13px; }
.opend-foot .o-pill { flex: 1; width: auto; margin: 0; }

/* --- Review as its own card (matches orders style) --------------------------- */
.rev-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; margin-top: 10px;
}
.rev-card .rev-text { margin-top: 6px; }

/* --- Reviews: avatar feed (App Store / Google style) ------------------------- */

.rev-feed.card { padding: 4px 14px; }
.rev-item {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rev-item:last-child { border-bottom: 0; }
.rev-ava {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 800 16px var(--sans); color: #fff;
}
.rev-body { flex: 1; min-width: 0; }
.rev-line1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rev-line1 .rev-author { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-line1 .rev-stars { flex: 0 0 auto; }
.rev-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rev-item .rev-text { font-size: 13.5px; line-height: 1.5; margin-top: 6px; }

/* --- Reviews: collapsible compact form --------------------------------------- */

.rev-form-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; background: none; border: 0; cursor: pointer;
  color: var(--text); font: 800 15px var(--sans); padding: 2px; text-align: left;
}
.rev-form-chev {
  color: var(--muted); font-size: 19px; flex: 0 0 auto; line-height: 1;
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rev-form.open .rev-form-chev { transform: rotate(90deg); }
.rev-form-body { max-height: 0; overflow: hidden; transition: max-height 0.32s ease; }
.rev-form.open .rev-form-body { max-height: 900px; }
.rev-prodpick { margin-top: 12px; }
.rev-prodpick .fchip { font-size: 13px; padding: 8px 14px; }
.rev-single-prod { color: var(--violet-soft); font-weight: 700; font-size: 14px; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) { .rev-form-body, .rev-form-chev { transition: none; } }
