/* ===================================================================
   GOLDEN WAVE — iOS Premium Design System
   =================================================================== */

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

:root {
  /* iOS Dark palette */
  --bg:           #000000;
  --bg-elevated:  #1c1c1e;
  --bg-secondary: #2c2c2e;
  --bg-tertiary:  #3a3a3c;
  --bg-blur:      rgba(28,28,30,0.78);
  --bg-blur-light: rgba(44,44,46,0.65);

  /* Fills */
  --fill:         rgba(120,120,128,0.2);
  --fill-secondary: rgba(120,120,128,0.16);
  --fill-tertiary: rgba(120,120,128,0.12);

  /* Separators */
  --separator:    rgba(84,84,88,0.35);
  --separator-opaque: #38383a;

  /* Labels */
  --label:        #ffffff;
  --label-secondary: rgba(235,235,245,0.6);
  --label-tertiary: rgba(235,235,245,0.3);
  --label-quaternary: rgba(235,235,245,0.18);

  /* Accents */
  --gold:         #FFD60A;
  --gold-soft:    #FFE066;
  --gold-dim:     rgba(255,214,10,0.15);
  --gold-glow:    rgba(255,214,10,0.35);
  --blue:         #0A84FF;
  --green:        #30D158;
  --green-dim:    rgba(48,209,88,0.15);
  --red:          #FF453A;
  --red-dim:      rgba(255,69,58,0.15);
  --cyan:         #64D2FF;
  --orange:       #FF9F0A;

  /* System */
  --radius:       14px;
  --radius-lg:    20px;
  --radius-sm:    10px;
  --radius-xs:    8px;
  --nav-height:   82px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);

  /* iOS Motion */
  --spring:       0.5s cubic-bezier(0.2, 0.9, 0.3, 1.05);
  --ease:         0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out:     0.3s cubic-bezier(0, 0, 0.2, 1);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--label);
  font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.41;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ============================================================
   VIDEO BACKGROUND
   ============================================================ */
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.video-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1;
}

/* ============================================================
   SCREENS
   ============================================================ */
.screen {
  position: fixed;
  inset: 0;
  bottom: var(--nav-height);
  z-index: 1;
  display: none;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px calc(16px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.screen-scroll::-webkit-scrollbar { display: none; }

/* ============================================================
   iOS LOADER
   ============================================================ */
#screen-loader {
  z-index: 999;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.loader-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--fill);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-brand {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--label);
}

.loader-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================================
   HEADER
   ============================================================ */
.ticket-header {
  text-align: center;
  padding: 8px 0 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--gold);
}

/* ============================================================
   PREMIUM TICKET CARD — Golden membership card
   ============================================================ */
.ticket-card {
  position: relative;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  /* Subtle gold border */
  border: 1px solid rgba(255,214,10,0.15);
  /* Dark premium gradient background */
  background:
    linear-gradient(145deg,
      rgba(40,35,20,0.9) 0%,
      rgba(20,18,12,0.95) 40%,
      rgba(25,22,15,0.9) 100%
    );
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  /* Ambient gold shadow */
  box-shadow:
    0 2px 40px rgba(255,214,10,0.06),
    0 0 0 0.5px rgba(255,214,10,0.1) inset;
}

/* Holographic shimmer overlay */
.ticket-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 35%,
    rgba(255,214,10,0.03) 42%,
    rgba(255,255,255,0.05) 50%,
    rgba(255,214,10,0.03) 58%,
    transparent 65%,
    transparent 100%
  );
  background-size: 250% 100%;
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ticket-card-body {
  position: relative;
  z-index: 1;
}

/* ---- Ticket top: branding ---- */
.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}

.ticket-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
}

.ticket-brand-icon {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.ticket-brand span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  opacity: 0.7;
}

.ticket-member {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--gold);
  opacity: 0.5;
}

/* ---- Animated wave in center ---- */
.ticket-wave-wrap {
  padding: 8px 0;
  overflow: hidden;
  position: relative;
}

.ticket-wave-svg {
  width: 100%;
  height: 60px;
  display: block;
}

.ticket-wave-path {
  stroke-dasharray: 800;
}

.tw-1 {
  animation: waveFlow 4s linear infinite;
}
.tw-2 {
  animation: waveFlow 5.5s linear infinite reverse;
}
.tw-3 {
  animation: waveFlow 7s linear infinite;
}

@keyframes waveFlow {
  from { stroke-dashoffset: 800; }
  to   { stroke-dashoffset: 0; }
}

/* ---- Perforated divider ---- */
.ticket-perforation {
  position: relative;
  height: 1px;
  margin: 0 20px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,214,10,0.15) 0px,
    rgba(255,214,10,0.15) 4px,
    transparent 4px,
    transparent 10px
  );
}

/* Circular notches on sides */
.ticket-perforation::before,
.ticket-perforation::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  transform: translateY(-50%);
  border: 1px solid rgba(255,214,10,0.1);
}

.ticket-perforation::before { left: -27px; }
.ticket-perforation::after  { right: -27px; }

/* ---- Chain inside ticket ---- */
.ticket-chain {
  padding: 12px 16px 16px;
}

.ticket-chain .chain-item {
  padding: 10px 4px;
}

.ticket-chain .chain-item:not(:last-child)::after {
  left: 22px;
  bottom: 0;
  height: 0.5px;
  background: rgba(255,214,10,0.08);
}

.ticket-chain .chain-level {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.ticket-chain .chain-name {
  font-size: 16px;
}

/* ---- Ticket card user avatar row (rendered by JS above chain) ---- */
.ticket-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 8px;
}

.ticket-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.ticket-user-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--label);
  letter-spacing: -0.2px;
}

.ticket-user-tag {
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
  opacity: 0.7;
}

/* ============================================================
   CHAIN — iOS List style
   ============================================================ */
.chain {
  padding: 0 0 8px;
}

.chain-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: relative;
  opacity: 0;
  transform: translateY(8px);
  animation: listIn 0.35s var(--ease) forwards;
}

.chain-item:nth-child(1) { animation-delay: 0.03s; }
.chain-item:nth-child(2) { animation-delay: 0.06s; }
.chain-item:nth-child(3) { animation-delay: 0.09s; }
.chain-item:nth-child(4) { animation-delay: 0.12s; }
.chain-item:nth-child(5) { animation-delay: 0.15s; }

@keyframes listIn {
  to { opacity: 1; transform: translateY(0); }
}

/* iOS separator between items */
.chain-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 60px;
  right: 0;
  height: 0.5px;
  background: var(--separator);
}

.chain-level {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--fill);
  color: var(--label-tertiary);
  transition: all 0.3s var(--ease);
}

.chain-item.filled .chain-level {
  background: rgba(100,210,255,0.15);
  color: var(--cyan);
}

.chain-item.is-you .chain-level {
  background: var(--gold-dim);
  color: var(--gold);
  box-shadow: 0 0 16px rgba(255,214,10,0.2);
}

.chain-name {
  font-size: 17px;
  font-weight: 400;
  color: var(--label-tertiary);
  flex: 1;
}

.chain-item.filled .chain-name {
  color: var(--label);
  font-weight: 500;
}

.chain-item.is-you .chain-name {
  color: var(--gold);
  font-weight: 600;
}

.chain-you {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 3px 10px;
  border-radius: 20px;
}

.chain-empty {
  font-size: 15px;
  color: var(--label-quaternary);
}

/* ============================================================
   STATS — iOS Metrics style
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-card:active {
  transform: scale(0.96);
  transition: transform 0.1s;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--cyan);
}

.stat-value.gold { color: var(--gold); }

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  margin-top: 4px;
}

/* ============================================================
   iOS BUTTONS
   ============================================================ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

/* Primary Gold CTA */
.btn-gold {
  background: var(--gold);
  color: #000;
}

/* iOS tinted button */
.btn-outline {
  background: var(--fill);
  color: var(--label-secondary);
  font-weight: 500;
}

.btn-outline:active {
  background: var(--fill-secondary);
}

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

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-sm {
  width: auto;
  padding: 10px 18px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   SCREEN TITLE — iOS Large Title
   ============================================================ */
.screen-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-top: 4px;
}

.screen-title h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.badge {
  background: var(--gold);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
}

/* ============================================================
   MINI TICKET CARDS (My Tickets screen)
   ============================================================ */
.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mini-ticket {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,214,10,0.1);
  background:
    linear-gradient(145deg,
      rgba(40,35,20,0.85) 0%,
      rgba(20,18,12,0.9) 50%,
      rgba(25,22,15,0.85) 100%
    );
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  padding: 16px;
  transition: transform 0.15s;
}

.mini-ticket:active { transform: scale(0.98); }

/* Wave decoration inside mini ticket */
.mini-ticket-wave {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  pointer-events: none;
  opacity: 0.6;
}

.mini-ticket-wave svg {
  width: 100%;
  height: 100%;
}

.mini-ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.mini-ticket-id {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.ticket-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.ticket-status.available {
  background: rgba(100,210,255,0.12);
  color: var(--cyan);
}

.ticket-status.sold {
  background: var(--green-dim);
  color: var(--green);
}

.mini-ticket-chain {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.mini-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  color: var(--label-quaternary);
  position: relative;
}

.mini-dot.filled {
  background: rgba(255,214,10,0.1);
  color: var(--gold);
}

.mini-dot.you {
  background: var(--gold-dim);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(255,214,10,0.15);
}

.mini-dot:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -6px;
  width: 4px;
  height: 1px;
  background: rgba(255,214,10,0.15);
}

.mini-ticket-buyer {
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.mini-ticket .btn {
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   PROFILE — iOS style
   ============================================================ */
.profile-card {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.profile-username {
  font-size: 15px;
  color: var(--label-secondary);
}

/* Balance — Large Display */
.balance-card {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 12px;
}

.balance-card-inner { /* wrapper kept for compatibility */ }

.balance-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.balance-amount {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--gold);
  line-height: 1;
}

.balance-currency {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}

.balance-earned {
  font-size: 15px;
  color: var(--label-secondary);
  margin-top: 8px;
}

.balance-earned span {
  color: var(--green);
  font-weight: 600;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

/* ============================================================
   TRANSACTIONS — iOS List
   ============================================================ */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.transactions-list {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  overflow: hidden;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: relative;
}

.tx-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 60px;
  right: 0;
  height: 0.5px;
  background: var(--separator);
}

.tx-item:active { background: var(--fill-tertiary); }

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tx-icon.income { background: var(--green-dim); }
.tx-icon.expense { background: var(--red-dim); }

.tx-info { flex: 1; min-width: 0; }

.tx-type {
  font-size: 17px;
  font-weight: 400;
  color: var(--label);
}

.tx-from {
  font-size: 13px;
  color: var(--label-tertiary);
}

.tx-amount {
  font-size: 17px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tx-amount.positive { color: var(--green); }
.tx-amount.negative { color: var(--red); }

/* ============================================================
   LEADERBOARD — iOS
   ============================================================ */
.season-header {
  text-align: center;
  margin-bottom: 16px;
  padding-top: 4px;
}

.season-title {
  font-size: 13px;
  color: var(--label-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.season-timer {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--label);
  margin-top: 4px;
}

.pool-card {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.pool-card-inner { /* compat wrapper */ }

.pool-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pool-amount {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--gold);
  margin-top: 4px;
}

.pool-currency { font-size: 18px; font-weight: 500; }

.leader-list {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.leader-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: relative;
}

.leader-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 60px;
  right: 0;
  height: 0.5px;
  background: var(--separator);
}

.leader-item.is-you {
  background: var(--gold-dim);
}

.leader-item:active { background: var(--fill-tertiary); }

.leader-rank {
  width: 28px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
  color: var(--label-secondary);
}

.leader-rank.r1 { color: #FFD700; }
.leader-rank.r2 { color: #C0C0C0; }
.leader-rank.r3 { color: #CD7F32; }

.leader-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--label-secondary);
  flex-shrink: 0;
}

.leader-name {
  flex: 1;
  font-size: 17px;
  font-weight: 400;
}

.leader-count {
  font-size: 15px;
  color: var(--label-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.my-rank {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  font-size: 15px;
  color: var(--label-secondary);
}

.my-rank strong { color: var(--gold); }

/* ============================================================
   INFO — iOS Cards
   ============================================================ */
.info-content { padding-bottom: 20px; }

.info-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  color: var(--label);
}

.info-card {
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}

.info-card:active { transform: scale(0.98); transition: transform 0.1s; }

.info-card-gold {
  border-color: rgba(255,214,10,0.2);
}

.info-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.info-card p {
  font-size: 15px;
  color: var(--label-secondary);
  line-height: 1.5;
}

.hl-gold {
  color: var(--gold);
  font-weight: 600;
}

.info-levels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--cyan);
  font-weight: 500;
}

.info-split {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  text-align: center;
}

.split-amount {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -1px;
}

.split-label {
  display: block;
  font-size: 12px;
  color: var(--label-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* ============================================================
   iOS TAB BAR
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-blur);
  border-top: 0.5px solid var(--separator);
  display: flex;
  z-index: 50;
  padding-bottom: var(--safe-bottom);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--label-tertiary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  padding-top: 6px;
}

.nav-item.active { color: var(--gold); }

.nav-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--spring);
}

.nav-item:active .nav-icon {
  transform: scale(0.8);
}

/* ============================================================
   iOS SHEET MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 480px;
  animation: sheetUp 0.4s var(--spring);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-handle {
  width: 36px;
  height: 5px;
  background: var(--fill);
  border-radius: 3px;
  margin: 8px auto 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--fill);
  border-radius: 50%;
  color: var(--label-secondary);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:active { opacity: 0.6; }

.modal-body { padding: 8px 16px 16px; }
.modal-footer { padding: 8px 16px 34px; }

.withdraw-balance {
  text-align: center;
  margin-bottom: 16px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--gold);
}

.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  margin-bottom: 6px;
  padding-left: 4px;
}

.input-row { display: flex; gap: 8px; }

.form-group input {
  flex: 1;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  background: var(--bg-secondary);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-sm);
  color: var(--label);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--gold);
}

.form-group input::placeholder { color: var(--label-quaternary); }

.withdraw-error {
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
  min-height: 18px;
  padding-left: 4px;
}

/* ============================================================
   iOS TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 16px;
  right: 16px;
  transform: translateY(100px);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--label);
  z-index: 300;
  transition: transform 0.4s var(--spring);
  text-align: center;
  background: var(--bg-blur);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--separator);
}

.toast.active { transform: translateY(0); }
.toast.success, .toast.toast-success { border-color: rgba(48,209,88,0.3); }
.toast.error, .toast.toast-error { border-color: rgba(255,69,58,0.3); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 15px;
  color: var(--label-secondary);
}

/* ============================================================
   FADE-IN ANIMATION
   ============================================================ */
.fade-in {
  animation: fadeIn 0.4s var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SELLER TAG (pre-purchase chain)
   ============================================================ */
.chain-item.is-seller {
  border-color: var(--gold);
  background: rgba(255,214,10,0.06);
}
.chain-item.is-seller .chain-you {
  background: rgba(255,214,10,0.2);
  color: var(--gold);
}

/* ============================================================
   TICKETS CAROUSEL (swipeable)
   ============================================================ */
.tickets-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 12px;
  scrollbar-width: none;
}
.tickets-carousel::-webkit-scrollbar { display: none; }

.carousel-card {
  flex: 0 0 calc(100% - 32px);
  scroll-snap-align: center;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 16px;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--label-quaternary);
  transition: all 0.3s ease;
}
.carousel-dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--gold);
}

/* Mini chain in ticket cards */
.ticket-mini-chain {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
}
.chain-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--fill-tertiary);
  font-size: 13px;
}
.chain-mini-row.filled {
  background: var(--fill-secondary);
}
.chain-mini-row.is-you {
  background: rgba(255,214,10,0.1);
  border: 1px solid rgba(255,214,10,0.3);
}
.chain-mini-lvl {
  font-weight: 700;
  color: var(--gold);
  min-width: 16px;
}
.chain-mini-name {
  flex: 1;
  color: var(--label);
}
.chain-mini-you {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255,214,10,0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ====== TICKET COUNTER ====== */
.ticket-counter {
  text-align: center;
  padding: 12px 16px;
  margin: 8px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,214,10,0.08);
  border: 1px solid rgba(255,214,10,0.15);
  border-radius: 12px;
}
.counter-highlight {
  color: var(--gold);
  font-size: 15px;
}
.counter-success {
  color: #34c759;
  font-size: 14px;
}

/* ====== MORE MENU ====== */
.more-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 4px;
}
.more-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-align: left;
  width: 100%;
}
.more-menu-item:active {
  transform: scale(0.97);
  background: rgba(255,255,255,0.1);
}
.more-menu-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,214,10,0.1);
  border-radius: 12px;
  flex-shrink: 0;
}
.more-menu-text {
  flex: 1;
  min-width: 0;
}
.more-menu-label {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.more-menu-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}
.more-menu-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

/* ====== STATS SCREEN ====== */
.stats-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}
.stats-level-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  margin-bottom: 8px;
  overflow: hidden;
}
.stats-level-card.has-stuck {
  border-color: rgba(255,149,0,0.3);
}
.stats-level-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.stats-level-header:active {
  background: rgba(255,255,255,0.04);
}
.stats-level-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,214,10,0.15);
  color: var(--gold);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stats-level-info {
  flex: 1;
  min-width: 0;
}
.stats-level-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.stats-level-counts {
  display: flex;
  gap: 12px;
  margin-top: 3px;
}
.stats-total {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.stats-unsold {
  font-size: 12px;
  color: #ff9500;
  font-weight: 600;
}
.stats-chevron {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  transition: transform 0.2s;
}
.stats-people {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 4px 0;
}
.stats-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 10px 64px;
}
.stats-person.person-stuck {
  background: rgba(255,149,0,0.06);
}
.person-name {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
}
.person-tickets {
  display: flex;
  gap: 10px;
}
.person-sold {
  font-size: 13px;
  color: #34c759;
}
.person-available {
  font-size: 13px;
  color: #ff9500;
  font-weight: 600;
}

/* ====== SUPPORT SCREEN ====== */
.support-form {
  padding: 20px 4px;
  text-align: center;
}
.support-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.support-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.support-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.support-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.support-textarea:focus {
  border-color: rgba(255,214,10,0.4);
}
.support-textarea::placeholder {
  color: rgba(255,255,255,0.3);
}
.support-char-count {
  text-align: right;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin: 6px 4px 16px;
}

/* ====== AGREEMENT ====== */
.agreement-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 0;
}
.agreement-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.agreement-checkbox span {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
}

/* ============================================================
   BUTTON LOADING STATE
   ============================================================ */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}
.btn.loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg,
    var(--fill-tertiary) 25%,
    var(--fill-secondary) 50%,
    var(--fill-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeletonPulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  width: 100%;
}
.skeleton-line.short { width: 60%; }
.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* ============================================================
   SCREEN TRANSITIONS — smoother
   ============================================================ */
.screen {
  will-change: opacity, transform;
}
.screen.active {
  animation: screenFadeIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RIPPLE ON TAP
   ============================================================ */
.nav-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: radial-gradient(circle at var(--tap-x, 50%) var(--tap-y, 50%), rgba(255,214,10,0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.nav-item:active::after { opacity: 1; }
.nav-item { position: relative; }

/* ============================================================
   SCROLL INDICATOR (subtle top shadow on scroll)
   ============================================================ */
.screen-scroll {
  mask-image: linear-gradient(to bottom, black 0%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 95%, transparent 100%);
}
