/* ========================================
   ANORX AI — MINI APP STYLES
   Syntx-style premium card layout
   ======================================== */

:root {
  --bg:           #0a0a0c;
  --bg2:          #111114;
  --card-std:     #0e1219;
  --card-pro:     #0a1410;
  --card-vip:     #130f05;
  --accent-std:   #4a9eff;
  --accent-pro:   #34c97a;
  --accent-vip:   #f0a832;
  --accent-green: #34c97a;   /* active price — uniform across all tariffs */
  --text:         #f0f0f0;
  --text2:        #9a9aaa;
  --text3:        #5a5a6a;
  --border:       rgba(255,255,255,0.06);
  --border-std:   rgba(74,158,255,0.22);
  --border-pro:   rgba(52,201,122,0.22);
  --border-vip:   rgba(240,168,50,0.26);
  --radius:       20px;
  --radius-sm:    14px;
  --radius-pill:  50px;
}

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

html, body {
  height: 100%; width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ======== SCREENS ======== */
.screen {
  display: none; flex-direction: column;
  height: 100vh; width: 100%;
  overflow: hidden;
  position: absolute; top: 0; left: 0;
}
.screen.active { display: flex; }

/* ======== HEADER ======== */
.screen-header {
  padding: 16px 20px 12px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 16px;
  color: var(--text); letter-spacing: -0.3px;
}
.header-sub {
  font-size: 11px; color: var(--text3);
  margin-left: auto;
  letter-spacing: 0.4px; text-transform: uppercase;
}
.back-btn {
  background: none; border: none;
  color: var(--accent-std);
  font-size: 13px; font-family: 'DM Sans', sans-serif;
  cursor: pointer; padding: 4px 0; flex-shrink: 0;
}

/* ======== CARDS TRACK ======== */
.cards-track-wrapper {
  flex: 1; overflow: hidden; position: relative;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.013) 0%, transparent 70%);
  /* CSS-level overscroll containment — prevents edge overscroll propagating up */
  overscroll-behavior: contain;
}
.cards-track {
  display: flex; height: 100%;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
  gap: 0; cursor: grab; user-select: none;
  /* Contain horizontal overscroll within this element */
  overscroll-behavior-x: contain;
}
.cards-track::-webkit-scrollbar { display: none; }
.cards-track.dragging { cursor: grabbing; }

/* Full-width slide for snap */
.tariff-card {
  scroll-snap-align: center;
  flex-shrink: 0; width: 100vw; height: 100%;
  padding: 16px 18px 14px;
  display: flex; flex-direction: column; align-items: stretch;
  background: var(--card-std);
  border-top: 3px solid var(--accent-std);
  overflow-y: auto; scrollbar-width: none;
  box-shadow: inset 0 -60px 80px rgba(0,0,0,0.32);
}
.tariff-card::-webkit-scrollbar { display: none; }
.card-pro { background: var(--card-pro); border-top-color: var(--accent-pro); }
.card-vip { background: var(--card-vip); border-top-color: var(--accent-vip); }

/* Centered premium inner layout */
.card-inner {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 420px;
  margin: 0 auto; flex: 1;
}

/* ======== CARD TOP ======== */
.card-top {
  display: flex; align-items: center;
  justify-content: space-between; padding-top: 4px;
}
.card-badge {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 26px;
  letter-spacing: -0.8px; line-height: 1;
}
.badge-standard { color: var(--accent-std); text-shadow: 0 0 24px rgba(74,158,255,0.28); }
.badge-pro       { color: var(--accent-pro); text-shadow: 0 0 24px rgba(52,201,122,0.28); }
.badge-vip       { color: var(--accent-vip); text-shadow: 0 0 24px rgba(240,168,50,0.28); }

.info-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: var(--text2); font-size: 13px;
  font-family: 'DM Sans', sans-serif; font-style: italic;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.info-btn:active { background: rgba(255,255,255,0.13); }
.tariff-card[data-tariff="standard"]  .info-btn { border-color: rgba(74,158,255,0.32); }
.tariff-card[data-tariff="pro"]       .info-btn { border-color: rgba(52,201,122,0.32); }
.tariff-card[data-tariff="unlimited"] .info-btn { border-color: rgba(240,168,50,0.32); }

/* ======== TOKEN BLOCK ======== */
.token-block {
  display: flex; align-items: baseline; gap: 7px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.04);
}
.token-block-std { border-color: rgba(74,158,255,0.18);  background: rgba(74,158,255,0.05);  }
.token-block-pro { border-color: rgba(52,201,122,0.18);  background: rgba(52,201,122,0.05);  }
.token-block-vip { border-color: rgba(240,168,50,0.20);  background: rgba(240,168,50,0.05);  }
.token-count {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 34px;
  line-height: 1; letter-spacing: -1.5px; color: var(--text);
}
.token-label { font-size: 13px; color: var(--text2); font-weight: 500; }

/* ======== CARD DESC ======== */
.card-desc {
  font-size: 12px; color: var(--text2);
  line-height: 1.55; padding: 9px 13px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px; border: 1px solid var(--border);
  letter-spacing: 0.1px;
}

/* ======== BENEFITS ======== */
.benefits-list { display: flex; flex-direction: column; gap: 0; }
.benefit-line {
  font-size: 13px; color: var(--text); font-weight: 500;
  padding: 7px 2px; border-bottom: 1px solid var(--border); line-height: 1.4;
}
.benefit-line:last-child { border-bottom: none; }

/* ======== DETAILS LINK — visible pill ======== */
.details-link {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 30px;
  color: var(--text2);
  font-size: 12px; font-family: 'DM Sans', sans-serif; font-weight: 500;
  cursor: pointer; text-align: center;
  padding: 8px 16px; letter-spacing: 0.1px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  width: 100%;
}
.details-link:active { background: rgba(255,255,255,0.09); color: var(--text); }

/* ======== PRICE BLOCK ======== */
.price-block {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: auto; padding-top: 4px;
}
/* Old/strikethrough — white, dimmed */
.price-old {
  font-size: 13px; color: #ffffff; opacity: 0.55;
  text-decoration: line-through; font-family: 'DM Sans', sans-serif;
}
/* Active price — bright green on all tariffs */
.price-new {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 22px;
  letter-spacing: -0.8px; color: var(--accent-green);
}
.price-currency {
  font-size: 13px; font-weight: 400;
  color: var(--accent-green); opacity: 0.8;
}

/* ======== BUY BUTTON — Syntx capsule CTA ======== */
.buy-btn {
  width: 100%; padding: 15px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 15px; letter-spacing: 0.4px;
  cursor: pointer; color: #000; margin-top: 2px;
  transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s;
}
.buy-btn:active { opacity: 0.88; transform: scale(0.975); }

/* Per-tariff card buy buttons */
.tariff-card[data-tariff="standard"] .buy-btn {
  background: var(--accent-std); border-color: rgba(74,158,255,0.50);
  box-shadow: 0 0 0 1px rgba(74,158,255,0.12), 0 6px 28px rgba(74,158,255,0.40), 0 2px 8px rgba(0,0,0,0.40);
}
.tariff-card[data-tariff="standard"] .buy-btn:active {
  box-shadow: 0 0 0 1px rgba(74,158,255,0.10), 0 2px 10px rgba(74,158,255,0.22);
}
.tariff-card[data-tariff="pro"] .buy-btn {
  background: var(--accent-pro); border-color: rgba(52,201,122,0.50);
  box-shadow: 0 0 0 1px rgba(52,201,122,0.12), 0 6px 28px rgba(52,201,122,0.40), 0 2px 8px rgba(0,0,0,0.40);
}
.tariff-card[data-tariff="pro"] .buy-btn:active {
  box-shadow: 0 0 0 1px rgba(52,201,122,0.10), 0 2px 10px rgba(52,201,122,0.22);
}
.tariff-card[data-tariff="unlimited"] .buy-btn {
  background: var(--accent-vip); border-color: rgba(240,168,50,0.50);
  box-shadow: 0 0 0 1px rgba(240,168,50,0.14), 0 6px 28px rgba(240,168,50,0.42), 0 2px 8px rgba(0,0,0,0.40);
}
.tariff-card[data-tariff="unlimited"] .buy-btn:active {
  box-shadow: 0 0 0 1px rgba(240,168,50,0.10), 0 2px 10px rgba(240,168,50,0.22);
}

/* ======== DOTS NAV ======== */
.dots-nav {
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 0 14px; flex-shrink: 0; background: var(--bg);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.12); transition: all 0.2s; cursor: pointer;
}
.dot.active { background: var(--text2); width: 20px; border-radius: 3px; }

/* ======== PAYMENT INSTRUCTION SCREEN ======== */
.pay-instruct-body {
  flex: 0 0 auto;
  overflow-y: auto;
  padding: 20px 20px 12px;
  display: flex; flex-direction: column; gap: 0;
}
.pi-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.pi-row:last-of-type { border-bottom: none; }
.pi-row-card { align-items: center; }
.pi-label { font-size: 13px; color: var(--text2); font-family: 'DM Sans', sans-serif; }
.pi-value {
  font-size: 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-weight: 600; text-align: right;
}
.pi-price {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 18px;
  color: var(--accent-green); letter-spacing: -0.5px;
}
.pi-card-group {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
}
.pi-card {
  font-family: 'DM Mono', 'DM Sans', monospace;
  font-size: 14px; letter-spacing: 1.2px; color: var(--text);
}
.pi-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Copy button */
.copy-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  color: var(--text2);
  font-size: 11px; font-family: 'DM Sans', sans-serif; font-weight: 500;
  padding: 4px 10px; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
.copy-btn:active { background: rgba(255,255,255,0.13); }
.copy-btn.copied {
  background: rgba(52,201,122,0.15);
  border-color: rgba(52,201,122,0.40);
  color: var(--accent-pro);
}

/* ======== GROUPED ACTION BLOCK: note + confirm button ======== */
.pay-action-block {
  flex-shrink: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex; flex-direction: column; gap: 10px;
}
.pay-action-note {
  font-size: 12px; color: var(--text3);
  line-height: 1.55; text-align: center;
}
/* Payment confirm button — green capsule */
.pay-confirm-btn {
  background: var(--accent-pro);
  border-color: rgba(52,201,122,0.50);
  color: #000; margin-top: 0;
  box-shadow: 0 0 0 1px rgba(52,201,122,0.12), 0 6px 28px rgba(52,201,122,0.38), 0 2px 8px rgba(0,0,0,0.40);
}
.pay-confirm-btn:active {
  box-shadow: 0 0 0 1px rgba(52,201,122,0.10), 0 2px 10px rgba(52,201,122,0.22);
}

/* ======== DETAILS SCREEN ======== */
.details-body {
  flex: 1; overflow-y: auto; padding: 0 0 8px; scrollbar-width: none;
}
.details-body::-webkit-scrollbar { display: none; }
.det-subtitle {
  font-size: 12px; color: var(--text2); line-height: 1.55;
  padding: 13px 20px 11px; border-bottom: 1px solid var(--border); letter-spacing: 0.1px;
}
.det-row {
  display: flex; align-items: center;
  justify-content: space-between; padding: 10px 20px; min-height: 38px;
}
.det-divider { height: 1px; background: var(--border); margin: 0 20px; }
.det-label { font-size: 13px; color: var(--text); font-family: 'DM Sans', sans-serif; font-weight: 400; }
.det-label-locked { color: var(--text3); }
.det-value {
  font-size: 13px; color: var(--text2);
  font-family: 'DM Sans', sans-serif; font-weight: 500;
  text-align: right; flex-shrink: 0; margin-left: 12px;
}
.det-value-special {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 12px;
  color: var(--text); letter-spacing: 0.2px;
}
.det-locked { font-size: 15px; color: var(--text3); }
.det-open   { color: var(--accent-pro); font-weight: 600; }
.det-footer {
  padding: 14px 20px 10px; border-top: 1px solid var(--border);
  margin-top: 8px; display: flex; flex-direction: column; gap: 8px;
}
.det-footer-note { font-size: 11px; color: var(--text3); line-height: 1.55; }

/* Details buy row */
.details-buy-row {
  padding: 12px 20px 18px; flex-shrink: 0;
  border-top: 1px solid var(--border); background: var(--bg);
}
.details-buy-btn {
  background: var(--accent-std); color: #000;
  border-color: rgba(74,158,255,0.50);
  box-shadow: 0 0 0 1px rgba(74,158,255,0.12), 0 6px 28px rgba(74,158,255,0.35), 0 2px 8px rgba(0,0,0,0.40);
}
#detailsBuyBtn.pro-buy {
  background: var(--accent-pro); color: #000;
  border-color: rgba(52,201,122,0.50);
  box-shadow: 0 0 0 1px rgba(52,201,122,0.12), 0 6px 28px rgba(52,201,122,0.35), 0 2px 8px rgba(0,0,0,0.40);
}
#detailsBuyBtn.vip-buy {
  background: var(--accent-vip); color: #000;
  border-color: rgba(240,168,50,0.50);
  box-shadow: 0 0 0 1px rgba(240,168,50,0.14), 0 6px 28px rgba(240,168,50,0.38), 0 2px 8px rgba(0,0,0,0.40);
}
