/* ═══════════════════════════════════════════════════════════════════════
   Pick 6 – Gamified UI  (app.css)
═══════════════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────────────── */
:root {
  --p6-yellow:      #FFCC00;
  --p6-yellow-dk:   #D4A900;
  --p6-yellow-lt:   #FFF3B0;
  --p6-dark:        #111111;
  --p6-dark2:       #1E1E1E;
  --p6-card-sel:    #fffbe0;
  --p6-nav-h:       56px;
  --p6-bnav-h:      64px;
  --p6-gold:        #FFD700;
  --p6-glow:        rgba(255,204,0,.45);
  --p6-glow-soft:   rgba(255,204,0,.18);
  --p6-success:     #10B981;
  --p6-success-bg:  #D1FAE5;
  --p6-danger:      #EF4444;
  --p6-glass-bg:    rgba(255,255,255,.06);
  --p6-glass-bdr:   rgba(255,255,255,.13);
  --p6-border:      #E5E7EB;
  --radius-card:    14px;
}

/* ── Keyframes ─────────────────────────────────────────────────────── */
@keyframes p6-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes p6-shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}
@keyframes p6-bounce-in {
  0%   { transform: scale(0.35); opacity: 0; }
  60%  { transform: scale(1.12); }
  80%  { transform: scale(0.94); }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes p6-slide-up {
  from { transform: translateY(22px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes p6-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px) rotate(-1.5deg); }
  40%      { transform: translateX( 5px) rotate( 1.5deg); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX( 3px); }
}
@keyframes p6-pulse-glow {
  0%,100% { box-shadow: 0 0 0 0   var(--p6-glow); }
  50%      { box-shadow: 0 0 0 10px transparent; }
}
@keyframes p6-ring {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.65; transform:scale(1.06); }
}
@keyframes p6-gradient-pan {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
@keyframes p6-confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}
@keyframes p6-star-twinkle {
  0%,100% { opacity: .25; transform: scale(1); }
  50%      { opacity: .9;  transform: scale(1.4); }
}
@keyframes p6-digit-flip {
  0%   { transform: scaleY(1); }
  45%  { transform: scaleY(0); }
  55%  { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}
@keyframes p6-match-glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
  50%      { box-shadow: 0 0 12px 4px rgba(16,185,129,.25); }
}

/* ── Layout ─────────────────────────────────────────────────────────── */
body {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255,204,0,.25), transparent 60%),
    linear-gradient(180deg, #0c0c0c 0%, #121212 35%, #0e0e0e 100%);
  color: #f5f5f5;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body.p6-login-view {
  background: var(--p6-dark);
}
body.p6-login-view .p6-main {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 100vh;
}
.p6-main {
  min-height: 100vh;
  padding-top: var(--p6-nav-h);
  padding-bottom: var(--p6-bnav-h);
}

/* ── Top Navbar ─────────────────────────────────────────────────────── */
.p6-navbar {
  background: rgba(10,10,10,.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: var(--p6-nav-h);
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
  border-bottom: 1px solid rgba(255,204,0,.15);
}

/* ── Bottom Nav ─────────────────────────────────────────────────────── */
.p6-bottom-nav {
  background: var(--p6-dark);
  height: var(--p6-bnav-h);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -4px 16px rgba(0,0,0,.4);
}
.p6-nav-btn {
  position: relative;
  background: none;
  border: none;
  color: #666;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: .63rem;
  font-weight: 700;
  padding: 4px 16px;
  transition: color .2s;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.p6-nav-btn i { font-size: 1.3rem; }
.p6-nav-btn.active { color: var(--p6-yellow); }
.p6-nav-btn.active::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--p6-yellow);
  box-shadow: 0 0 6px var(--p6-glow);
}
.p6-nav-btn:hover { color: #aaa; }

/* ── Login page ─────────────────────────────────────────────────────── */
.p6-login-bg {
  background:
    radial-gradient(ellipse at 15% 20%, rgba(255,204,0,.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(255,140,0,.06) 0%, transparent 55%),
    linear-gradient(160deg, #090909 0%, #1a1a1a 60%, #1c1000 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}
/* animated star particles */
.p6-login-bg .p6-star {
  position: absolute;
  border-radius: 50%;
  background: var(--p6-yellow);
  animation: p6-star-twinkle 2s ease-in-out infinite;
}

.p6-login-trophy {
  font-size: 5rem;
  display: inline-block;
  animation: p6-float 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(255,204,0,.6));
}
.p6-login-title {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #FFCC00 0%, #FF8C00 50%, #FFCC00 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: p6-shimmer 3s linear infinite;
}
.p6-login-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,204,0,.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  width: 100%;
  max-width: 400px;
}
.p6-login-input {
  background: rgba(255,255,255,.09) !important;
  border: 2px solid rgba(255,255,255,.15) !important;
  color: #fff !important;
  border-radius: 10px !important;
}
.p6-login-input::placeholder { color: rgba(255,255,255,.3) !important; }
.p6-login-input:focus {
  border-color: var(--p6-yellow) !important;
  box-shadow: 0 0 0 3px var(--p6-glow-soft) !important;
  background: rgba(255,204,0,.07) !important;
  outline: none;
}
.p6-login-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
  -webkit-text-fill-color: #fff !important;
}

/* Dial-code dropdown — same dark glass style as the number input */
.p6-dialcode-select {
  background: rgba(255,255,255,.09) !important;
  border: 2px solid rgba(255,255,255,.15) !important;
  border-right: none !important;
  color: #fff !important;
  border-radius: 10px 0 0 10px !important;
  font-weight: 600;
  font-size: 1rem !important;
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
  padding-left: 10px !important;
  padding-right: 28px !important;
  background-position: right 6px center !important;
  background-size: 14px 10px !important;
  cursor: pointer;
}
.p6-dialcode-select:focus {
  border-color: var(--p6-yellow) !important;
  box-shadow: 0 0 0 3px var(--p6-glow-soft) !important;
  background: rgba(255,204,0,.07) !important;
  outline: none;
}
.p6-dialcode-select option {
  background: #1a1a1a;
  color: #fff;
}
/* When combined in input-group, square left side of number field */
.p6-dialcode-select + .p6-login-input {
  border-radius: 0 10px 10px 0 !important;
}
.p6-login-btn {
  background: linear-gradient(135deg, var(--p6-yellow), var(--p6-yellow-dk));
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--p6-dark);
  width: 100%;
  letter-spacing: .02em;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 4px 16px rgba(255,204,0,.35);
}
.p6-login-btn:hover   { opacity: .92; }
.p6-login-btn:active  { transform: scale(.97); }
.p6-login-btn:disabled { opacity: .55; transform: none; cursor: not-allowed; }

/* ── Back button ─────────────────────────────────────────────────────── */
.p6-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 6px 14px 6px 10px;
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  margin-bottom: 14px;
}
.p6-back-btn:hover {
  background: rgba(255,204,0,.13);
  border-color: rgba(255,204,0,.35);
  color: #fff;
  text-decoration: none;
}
.p6-back-btn:active { transform: scale(.95); }
.p6-back-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Draw banner ─────────────────────────────────────────────────────── */
.p6-draw-banner {
  background: linear-gradient(135deg, #0D0D0D, #1E1E1E);
  border: 1px solid rgba(255,204,0,.22);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

/* Draw picker — horizontal scrollable pill row */
.p6-draw-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 10px;
  padding-bottom: 2px;
}
.p6-draw-picker::-webkit-scrollbar { display: none; }
.p6-draw-pill {
  flex-shrink: 0;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,204,0,.25);
  border-radius: 20px;
  color: rgba(255,255,255,.65);
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.p6-draw-pill:hover  { background: rgba(255,204,0,.15); color: #fff; }
.p6-draw-pill.active { background: var(--p6-yellow); border-color: var(--p6-yellow); color: #000; }
.p6-draw-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--p6-yellow) 50%, transparent 100%);
  animation: p6-shimmer 2.5s linear infinite;
  background-size: 200% auto;
}

/* Flip-clock countdown */
.p6-clock-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
}
.p6-clock-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.p6-clock-digit {
  background: #0a0a0a;
  border: 1px solid rgba(255,204,0,.3);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--p6-yellow);
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: center;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 1px 0 rgba(255,204,0,.12);
  line-height: 1;
  transition: transform .1s;
}
.p6-clock-digit.tick {
  animation: p6-digit-flip .25s ease;
}
.p6-clock-label {
  font-size: .5rem;
  font-weight: 700;
  color: rgba(255,204,0,.55);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 3px;
}
.p6-clock-sep {
  font-size: 1.2rem;
  font-weight: 900;
  color: rgba(255,204,0,.55);
  padding-bottom: 10px;
}

/* ── Phone catalog card ─────────────────────────────────────────────── */
.p6-phone-card {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.06);
  text-align: center;
  position: relative;
  transition: border-color .18s, background .18s, transform .14s, box-shadow .18s;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  height: 100%;
}
.p6-phone-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,204,0,.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.p6-phone-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.09);
}
.p6-phone-card:hover::after { opacity: 1; }
.p6-phone-card:active { transform: scale(.93); }
.p6-phone-card.selected {
  border-color: rgba(255,204,0,.9);
  background: rgba(255,204,0,.1);
  box-shadow: 0 0 0 2px rgba(255,204,0,.25), 0 10px 28px rgba(0,0,0,.4);
  transform: scale(1.04);
}
.p6-phone-card.selected::after { opacity: 1; }
.p6-phone-card.pop   { animation: p6-bounce-in .35s cubic-bezier(.34,1.56,.64,1); }
.p6-phone-card.shake { animation: p6-shake .4s ease; }

/* selection badge */
.p6-sel-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--p6-yellow);
  color: var(--p6-dark);
  font-size: .6rem;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  animation: p6-bounce-in .3s cubic-bezier(.34,1.56,.64,1);
}
.p6-phone-card.selected .p6-sel-badge { display: flex; }

.p6-phone-img-wrap {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: rgba(255,204,0,.04);
}
.p6-phone-img {
  max-width: 80%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.45));
}
.p6-phone-meta {
  padding: .3rem .35rem .4rem;
}
.p6-phone-emoji { font-size: 1.6rem; line-height: 1; }
.p6-phone-name {
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  word-break: break-word;
}
.p6-phone-sub {
  font-size: .6rem;
  color: rgba(255,255,255,.45);
  margin-top: 1px;
}

/* ── Picks meter (6 dots) ───────────────────────────────────────────── */
.p6-picks-meter {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 10px 0 6px;
}
.p6-pick-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  background: transparent;
  transition: background .22s, border-color .22s, transform .22s;
}
.p6-pick-dot.filled {
  background: var(--p6-yellow);
  border-color: var(--p6-yellow-dk);
  transform: scale(1.25);
}
.p6-pick-dot.filled.last-filled { animation: p6-pulse-glow 1.4s ease infinite; }

/* ── Lucky Pick button ─────────────────────────────────────────────── */
.p6-lucky-btn {
  background: linear-gradient(135deg, #b8860b 0%, #ffd700 45%, #ffb300 75%, #b8860b 100%);
  background-size: 200% 200%;
  border: none;
  color: #111;
  border-radius: 24px;
  padding: 10px 22px;
  font-size: .88rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
  letter-spacing: .03em;
  box-shadow: 0 0 16px rgba(255, 200, 0, .45), 0 3px 10px rgba(0,0,0,.4);
  animation: lucky-shine 2.8s ease-in-out infinite;
}
@keyframes lucky-shine {
  0%,100% { box-shadow: 0 0 16px rgba(255,200,0,.45), 0 3px 10px rgba(0,0,0,.4); }
  50%      { box-shadow: 0 0 28px rgba(255,200,0,.85), 0 4px 14px rgba(0,0,0,.5); }
}
.p6-lucky-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 0 36px rgba(255, 200, 0, .95), 0 5px 18px rgba(0,0,0,.5);
  animation: none;
}
.p6-lucky-btn:active { transform: scale(.97); }

/* ── Sticky CTA bar ─────────────────────────────────────────────────── */
.p6-cta-bar {
  position: fixed;
  bottom: var(--p6-bnav-h);
  left: 0; right: 0;
  padding: 10px 16px;
  background: rgba(10,10,10,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -4px 14px rgba(0,0,0,.3);
  z-index: 900;
}
.p6-cta-btn {
  border: none;
  border-radius: 13px;
  padding: 13px;
  font-size: 1rem;
  font-weight: 800;
  width: 100%;
  letter-spacing: .02em;
  transition: all .3s;
}
.p6-cta-btn.disabled-state {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
}
.p6-cta-btn.ready {
  background: linear-gradient(100deg,
    var(--p6-yellow) 0%,
    var(--p6-yellow-dk) 35%,
    #ffe566 52%,
    var(--p6-yellow-dk) 65%,
    var(--p6-yellow) 100%);
  background-size: 250% 100%;
  color: var(--p6-dark);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255,204,0,.4);
  animation: p6-cta-shimmer 2.4s linear infinite, p6-pulse-glow 2.5s ease infinite;
}
@keyframes p6-cta-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ── Confetti canvas overlay ────────────────────────────────────────── */
#p6-confetti {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ── Ticket list ────────────────────────────────────────────────────── */
.p6-ticket-card {
  cursor: pointer;
  border-radius: 13px;
  border-left: 4px solid #E5E7EB !important;
  transition: box-shadow .15s, transform .15s;
  animation: p6-slide-up .35s ease both;
}
.p6-ticket-card:nth-child(1) { animation-delay: .04s; }
.p6-ticket-card:nth-child(2) { animation-delay: .09s; }
.p6-ticket-card:nth-child(3) { animation-delay: .14s; }
.p6-ticket-card:nth-child(4) { animation-delay: .19s; }
.p6-ticket-card:nth-child(5) { animation-delay: .24s; }
.p6-ticket-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.14) !important;
  transform: translateY(-2px);
}
.p6-ticket-card.won     { border-left-color: var(--p6-success) !important; }
.p6-ticket-card.lost    { border-left-color: #9CA3AF !important; }
.p6-ticket-card.pending { border-left-color: var(--p6-yellow)  !important; }

/* Draw group header (My Tickets grouped view) */
.p6-draw-group-header {
  transition: background .15s, border-color .15s;
  user-select: none;
}
.p6-draw-group-header:hover {
  background: rgba(255,204,0,.07) !important;
  border-color: rgba(255,204,0,.3) !important;
}

/* streak banner */
.p6-streak-card {
  background: linear-gradient(135deg, #0d0d0d, #1e1e1e);
  border: 1px solid rgba(255,204,0,.28);
  border-radius: var(--radius-card);
  color: #fff;
  animation: p6-slide-up .3s ease;
}

/* ── Pick detail cards ──────────────────────────────────────────────── */
.p6-pick-card {
  border-radius: 10px;
  padding: 10px 4px 8px;
  background: #F9FAFB;
  text-align: center;
  border: 2px solid #E5E7EB;
  transition: transform .2s, box-shadow .2s;
  color: #1a1a1a;
}
.p6-pick-card.match {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  border-color: var(--p6-success);
  box-shadow: 0 0 0 2px rgba(16,185,129,.2), 0 4px 14px rgba(16,185,129,.15);
  animation: p6-bounce-in .5s cubic-bezier(.34,1.56,.64,1), p6-match-glow 2s ease 1s infinite;
}
.p6-pick-card .match-label {
  font-size: .54rem;
  font-weight: 800;
  color: #065F46;
  text-transform: uppercase;
  letter-spacing: .07em;
  display: block;
  margin-top: 4px;
}

/* ── Win phone card ─────────────────────────────────────────────────── */
.p6-win-phone {
  border-radius: 10px;
  background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
  border: 2px solid var(--p6-yellow);
  padding: 8px 4px;
  text-align: center;
  animation: p6-bounce-in .5s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 4px 14px rgba(255,204,0,.28);
}

/* ── Pay result trophy ──────────────────────────────────────────────── */
.p6-trophy-big {
  font-size: 5.5rem;
  display: inline-block;
  animation: p6-bounce-in .6s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(0 0 20px rgba(255,204,0,.7));
}

/* ── Results: animated phone cards ─────────────────────────────────── */
.p6-res-phone {
  border-radius: 10px;
  background: #fff;
  border: 2px solid rgba(255,204,0,.6);
  padding: 8px 4px;
  text-align: center;
  animation: p6-slide-up .4s ease both;
  box-shadow: 0 4px 12px rgba(255,204,0,.15);
}
.p6-res-phone:nth-child(1) { animation-delay: .1s; }
.p6-res-phone:nth-child(2) { animation-delay: .2s; }
.p6-res-phone:nth-child(3) { animation-delay: .3s; }
.p6-res-phone:nth-child(4) { animation-delay: .4s; }
.p6-res-phone:nth-child(5) { animation-delay: .5s; }
.p6-res-phone:nth-child(6) { animation-delay: .6s; }

/* ── Glassy dark card (confirm, paying screens) ─────────────────────── */
.p6-glass-dark {
  background: linear-gradient(135deg, #111, #1e1e1e);
  border: 1px solid rgba(255,204,0,.2);
  border-radius: var(--radius-card);
}

/* ── Section title ─────────────────────────────────────────────────── */
.p6-section-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.01em;
}

/* ── Spinner overlay ────────────────────────────────────────────────── */
.p6-spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 12px;
  color: #9CA3AF;
}

/* ── Misc Bootstrap overrides ───────────────────────────────────────── */
.btn-warning        { color: var(--p6-dark) !important; font-weight: 700; }
.text-warning       { color: var(--p6-yellow) !important; }
.bg-warning         { background-color: var(--p6-yellow) !important; }
.border-warning     { border-color: var(--p6-yellow) !important; }
.badge-active       { background: var(--p6-success); }
.badge-pending      { background: #F59E0B; color: #111; }
.badge-failed       { background: var(--p6-danger); }
.badge-cancel       { background: #6B7280; }
code                { color: var(--p6-yellow-dk); }

/* ── Progress bar paying screen ─────────────────────────────────────── */
.p6-paying-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--p6-yellow), #FF8C00, var(--p6-yellow));
  background-size: 200% 100%;
  animation: p6-shimmer 1.5s linear infinite;
}

/* ── Dark Bootstrap card override ───────────────────────────────────── */
.card {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #f5f5f5;
}
.card-header {
  border-color: rgba(255,255,255,.1) !important;
  background: rgba(0,0,0,.2) !important;
}
.list-group-item {
  background: transparent;
  border-color: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85);
}
.text-muted { color: rgba(255,255,255,.5) !important; }
.alert-secondary {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
}

/* ── Max-width page container ────────────────────────────────────────── */
.p6-container { max-width: 1200px; margin: 0 auto; }

/* ── Disabled phone card (max selection reached) ─────────────────────── */
.p6-disabled-card {
  opacity: .38;
  filter: grayscale(.2);
  pointer-events: none;
}

/* ── Selection chip tray ─────────────────────────────────────────────── */
.p6-chip-tray {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-card);
  padding: .75rem;
}
.p6-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .22rem .5rem;
  margin: .2rem .2rem 0 0;
  font-size: .8rem;
  color: rgba(255,255,255,.9);
}
.p6-chip img {
  width: 20px; height: 20px;
  object-fit: contain;
  border-radius: 5px;
  background: rgba(255,204,0,.08);
}
.p6-chip-remove {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-weight: 900;
  padding: 0 .15rem;
  line-height: 1;
  cursor: pointer;
  font-size: .95rem;
}
.p6-chip-remove:hover { color: #fff; }

/* ── Clear All button ────────────────────────────────────────────────── */
.p6-clear-btn {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.75);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  letter-spacing: .02em;
}
.p6-clear-btn:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.p6-clear-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ── "How you win" info panel ────────────────────────────────────────── */
.p6-how-win {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-card);
  padding: .75rem;
}
/* ═══════════════════════════════════════════════════════════════════════
   GAMIFICATION ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Draw pill: loading state ────────────────────────────────────────── */
.p6-draw-pill.p6-pill-loading {
  opacity: .8;
  cursor: not-allowed;
  gap: 5px;
  display: inline-flex;
  align-items: center;
}
.p6-pill-spin {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: p6-pill-spin .6s linear infinite;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes p6-pill-spin {
  to { transform: rotate(360deg); }
}

/* ── Skeleton shimmer cards (phone grid while draw is loading) ───────── */
@keyframes p6-skeleton-wave {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.p6-skeleton-card {
  border-radius: 13px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.05) 25%,
    rgba(255,255,255,.12) 50%,
    rgba(255,255,255,.05) 75%
  );
  background-size: 200% 100%;
  animation: p6-skeleton-wave 1.4s ease-in-out infinite;
  aspect-ratio: 1 / 1;
  min-height: 100px;
  border: 1px solid rgba(255,255,255,.07);
}

/* ── Countdown urgency colouring ─────────────────────────────────────── */
.p6-clock-digit.urgent {
  color: #FF8C00;
  border-color: rgba(255,140,0,.45);
  text-shadow: 0 0 8px rgba(255,140,0,.5);
}
.p6-clock-digit.critical {
  color: #FF3366;
  border-color: rgba(255,51,102,.55);
  text-shadow: 0 0 10px rgba(255,51,102,.6);
  animation: p6-clock-critical 1s ease infinite;
}
@keyframes p6-clock-critical {
  0%,100% { box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0   0 rgba(255,51,102,.4); }
  50%      { box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 10px 3px rgba(255,51,102,.35); }
}

/* ── Chip tray: slide-pop entry animation ────────────────────────────── */
@keyframes p6-chip-in {
  from { opacity: 0; transform: scale(.65) translateY(6px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.p6-chip {
  animation: p6-chip-in .28s cubic-bezier(.34,1.56,.64,1) both;
}

/* ═══════════════════════════════════════════════════════════════════════
   LANDING PAGE / SPA LOGIN ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

/* Smooth anchor scrolling */
html { scroll-behavior: smooth; }

/* ── Landing modifier: override centred flex so sections stack ────── */
.p6-login-bg.p6-landing {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
}

/* ── Hero section (first fold, grows to fit sign-in card) ────────── */
.p6-landing-hero {
  min-height: 100vh;
  padding: 4rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
  justify-content: flex-start;
}

/* ── Shared section wrapper ──────────────────────────────────────── */
.p6-landing-section {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

/* ── Prize ladder chips ──────────────────────────────────────────── */
.p6-prize-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .8rem;
  font-weight: 700;
  color: rgba(255,255,255,.8);
}
.p6-prize-chip-gold {
  background: rgba(255,204,0,.12);
  border-color: rgba(255,204,0,.45);
  color: var(--p6-yellow);
}
.p6-prize-chip-jackpot {
  background: linear-gradient(135deg, rgba(255,204,0,.2), rgba(255,140,0,.15));
  border-color: rgba(255,204,0,.65);
  color: #FFCC00;
  font-size: .88rem;
  box-shadow: 0 0 12px rgba(255,204,0,.2);
  animation: p6-pulse-glow 2s ease infinite;
}

/* ── Telegram CTA button (hero) ──────────────────────────────────── */
.p6-tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #29b5e8;
  color: #fff !important;
  font-weight: 700;
  border-radius: 28px;
  padding: 11px 24px;
  font-size: .92rem;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 14px rgba(41,181,232,.35);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.p6-tg-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(41,181,232,.55);
  background: #1aa3d5;
}
.p6-tg-btn:active { transform: scale(.97); }

/* ── Ghost channel button (hero) ─────────────────────────────────── */
.p6-tg-channel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255,255,255,.8) !important;
  font-weight: 700;
  border-radius: 28px;
  padding: 10px 22px;
  font-size: .92rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.28);
  transition: all .2s;
}
.p6-tg-channel-btn:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.08);
}

/* ── Scroll hint arrow ───────────────────────────────────────────── */
.p6-scroll-hint {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Bounce-y keyframe (scroll hint arrow) ───────────────────────── */
@keyframes p6-bounce-y {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ── How It Works — redesigned section ──────────────────────────── */
.p6-how-section {
  background: linear-gradient(180deg, rgba(255,204,0,.06) 0%, transparent 100%);
  border-top: 1px solid rgba(255,204,0,.15);
  padding: 3rem 1.5rem 4rem;
}
.p6-how-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.p6-how-eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--p6-yellow);
  margin-bottom: .4rem;
}
.p6-how-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2.5rem;
  letter-spacing: -.02em;
}

/* Step cards row */
.p6-how-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 2.5rem;
}
.p6-how-card {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 1.5rem 1rem 1.25rem;
  position: relative;
  transition: border-color .2s, background .2s, transform .2s;
}
.p6-how-card:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,204,0,.35);
  transform: translateY(-3px);
}
.p6-how-connector {
  width: 28px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p6-how-connector::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,204,0,.4), rgba(255,204,0,.15));
}
.p6-how-connector::after {
  content: '›';
  color: rgba(255,204,0,.5);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}
.p6-how-card-num {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: .65rem;
  font-weight: 900;
  color: rgba(255,204,0,.35);
  letter-spacing: .04em;
}
.p6-how-card-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: .75rem;
}
.p6-how-card-title {
  font-size: .95rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: .4rem;
}
.p6-how-card-desc {
  font-size: .78rem;
  color: rgba(255,255,255,.48);
  line-height: 1.5;
  margin: 0;
}

/* Prize tier bar */
.p6-how-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.p6-how-tier {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-size: .82rem;
}
.p6-how-tier-match { color: rgba(255,255,255,.6); font-weight: 600; }
.p6-how-tier-prize { color: #fff; font-weight: 800; }
.p6-how-tier-gold {
  border-color: rgba(255,204,0,.4);
  background: rgba(255,204,0,.08);
}
.p6-how-tier-gold .p6-how-tier-prize { color: var(--p6-yellow); }
.p6-how-tier-jackpot {
  border-color: rgba(255,204,0,.65);
  background: linear-gradient(135deg, rgba(255,204,0,.15), rgba(255,140,0,.1));
  box-shadow: 0 0 12px rgba(255,204,0,.15);
}
.p6-how-tier-jackpot .p6-how-tier-match,
.p6-how-tier-jackpot .p6-how-tier-prize { color: var(--p6-yellow); }

/* Stack connectors vertically on small screens */
@media (max-width: 575px) {
  .p6-how-steps {
    flex-direction: column;
    gap: .75rem;
  }
  .p6-how-connector {
    width: auto;
    height: 20px;
    align-self: center;
    transform: none;
  }
  .p6-how-connector::before {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: none;
    background: linear-gradient(180deg, rgba(255,204,0,.4), rgba(255,204,0,.15));
  }
  .p6-how-connector::after {
    content: '\2304'; /* downward arrow */
  }
}

/* ── Telegram icon button (top navbar) ──────────────────────────── */
.p6-tg-icon-btn {
  color: #29b5e8 !important;
  border-color: rgba(41,181,232,.45) !important;
  transition: background .2s, border-color .2s;
}
.p6-tg-icon-btn:hover {
  background: rgba(41,181,232,.12) !important;
  border-color: #29b5e8 !important;
}

/* ── Telegram 5th tab (bottom nav) ──────────────────────────────── */
.p6-nav-btn.p6-nav-tg {
  color: rgba(41,181,232,.6);
  text-decoration: none;
}
.p6-nav-btn.p6-nav-tg:hover {
  color: #29b5e8;
}

/* ── Telegram card (Account / wallet screen) ─────────────────────── */
.p6-tg-card {
  border: 1px solid rgba(41,181,232,.28) !important;
  background: rgba(41,181,232,.05) !important;
}
/* Telegram btn inside wallet card — tighten sizing */
.p6-tg-card .p6-tg-btn {
  padding: 7px 14px;
  font-size: .82rem;
  border-radius: 8px;
}

/* ── Login draw countdown widget ─────────────────────────────────────────── */
.p6-login-draw-widget {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,204,0,.22);
  border-radius: 16px;
  padding: 1.1rem 1rem .85rem;
  text-align: center;
}
.p6-login-draw-label {
  font-size: .72rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Draw selector chips (login page) */
.p6-draw-chip {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  color: rgba(255,255,255,.6);
  font-size: .73rem;
  font-weight: 700;
  padding: .28rem .8rem;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
  outline: none;
}
.p6-draw-chip:hover {
  background: rgba(255,204,0,.1);
  border-color: rgba(255,204,0,.35);
  color: var(--p6-yellow);
}
.p6-draw-chip.active {
  background: rgba(255,204,0,.16);
  border-color: rgba(255,204,0,.55);
  color: var(--p6-yellow);
}

/* ── Support thread (wallet screen) ─────────────────────────────────────── */
.p6-support-thread {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 0;
}
.p6-support-msg {
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: .82rem;
  line-height: 1.4;
}
.p6-support-msg.player {
  background: rgba(255,204,0,.12);
  border: 1px solid rgba(255,204,0,.3);
  margin-left: 10%;
}
.p6-support-msg.admin {
  background: rgba(41,181,232,.1);
  border: 1px solid rgba(41,181,232,.3);
  margin-right: 10%;
}
.p6-support-meta {
  font-size: .62rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 3px;
}

/* ── Support ticket accordion ────────────────────────────────────────────── */
.p6-supp-ticket {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  overflow: hidden;
}
.p6-supp-ticket.open {
  border-color: rgba(41,181,232,.35);
}
.p6-supp-ticket.resolved {
  border-color: rgba(255,255,255,.08);
  opacity: .85;
}
.p6-supp-ticket-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  row-gap: 2px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  background: rgba(255,255,255,.04);
  user-select: none;
  transition: background .15s;
}
.p6-supp-ticket-header:hover { background: rgba(255,255,255,.07); }
.p6-supp-ticket-title {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1;
  grid-row: 1;
}
.p6-supp-ticket-id {
  font-size: .7rem;
  font-weight: 800;
  color: rgba(255,255,255,.55);
  letter-spacing: .03em;
}
.p6-supp-badge {
  font-size: .6rem;
  font-weight: 800;
  border-radius: 4px;
  padding: 1px 7px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.p6-supp-badge.open {
  background: rgba(41,181,232,.2);
  color: #29b5e8;
  border: 1px solid rgba(41,181,232,.4);
}
.p6-supp-badge.resolved {
  background: rgba(16,185,129,.15);
  color: #10b981;
  border: 1px solid rgba(16,185,129,.3);
}
.p6-supp-ticket-snippet {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  grid-column: 1;
  grid-row: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.p6-supp-ticket-date {
  font-size: .62rem;
  color: rgba(255,255,255,.35);
  grid-column: 2;
  grid-row: 2;
  text-align: right;
}
.p6-supp-chevron {
  grid-column: 2;
  grid-row: 1;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
}
.p6-supp-ticket-body {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.p6-supp-compose .form-control {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-size: .82rem;
  resize: none;
}
.p6-supp-compose .form-control:focus {
  border-color: rgba(41,181,232,.5) !important;
  box-shadow: 0 0 0 3px rgba(41,181,232,.12) !important;
  outline: none;
}
.p6-supp-compose .form-control::placeholder { color: rgba(255,255,255,.3) !important; }
.p6-supp-resolved-note {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  padding: 6px 0 0;
}