/* =============================================================
   SPIN TOOLS — Phase 2.2 Styles
   Vòng Quay Thế Giới Theme
   ============================================================= */

/* ── Screen reader only ── */
.vqtg-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Spin Button ── */
.vqtg-spin-btn {
  letter-spacing: .5px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.vqtg-spin-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,211,106,.35);
}
.vqtg-spin-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Interface Section ── */
.vqtg-interface-section { padding: 50px 0; }

/* ── Tool Wrap (grid) ── */
.vqtg-tool-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.vqtg-spinner-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.vqtg-controls-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.vqtg-controls-col h2 {
  font-size: 30px;
  margin-bottom: 20px;
  line-height: 1.25;
}

/* ── Countdown ── */
.vqtg-countdown {
  font-size: 64px;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
  margin-top: 16px;
  text-shadow: 0 0 40px rgba(255,211,106,.6);
  animation: vqtgPop .4s ease both;
}

/* ── Number Result Balls ── */
.vqtg-number-result {
  margin: 18px 0;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255,211,106,.07);
  border: 1px solid rgba(255,211,106,.18);
}
.vqtg-result-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.vqtg-result-ball {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  color: #160818;
  background: radial-gradient(circle at 30% 25%, #fff, #ffe096 34%, #ff9f2f 72%);
  box-shadow: 0 0 28px rgba(255,211,106,.4), 0 8px 20px rgba(0,0,0,.3);
  cursor: default;
  user-select: none;
}

/* Jackpot Flash */
.vqtg-jackpot-flash { animation: vqtgJackpot 1.4s ease both; }
@keyframes vqtgJackpot {
  0%   { box-shadow: 0 0 0 rgba(255,211,106,0); }
  30%  { box-shadow: 0 0 80px rgba(255,211,106,.8), 0 0 160px rgba(255,159,47,.5);
          background: rgba(255,211,106,.15); }
  100% { box-shadow: 0 0 0 rgba(255,211,106,0); }
}

/* ── Pop Animation ── */
@keyframes vqtgPop {
  0%   { opacity: 0; transform: scale(.65) translateY(12px); }
  70%  { transform: scale(1.06) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* =============================================================
   LUCKY SPIN — Canvas Wheel
   ============================================================= */
.vqtg-wheel-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
#vqtgLuckyCanvas {
  border-radius: 50%;
  border: 3px solid rgba(255,211,106,.4);
  box-shadow:
    0 0 60px rgba(255,211,106,.2),
    0 0 120px rgba(141,92,255,.12),
    inset 0 0 40px rgba(0,0,0,.3);
  max-width: 300px;
  width: 100%;
  height: auto;
}
.vqtg-wheel-pointer-top {
  font-size: 32px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,211,106,.9);
  margin-bottom: -10px;
  position: relative;
  z-index: 2;
  animation: vqtgPointerBob 2s ease-in-out infinite;
}
@keyframes vqtgPointerBob {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* =============================================================
   LOTTERY SPHERE — Cage Ring (reuse theme .cage styles)
   ============================================================= */
/* Cage styles live in style.css; only overrides here */
#vqtgCageRing .vqtg-ball-num {
  transition: opacity .1s ease;
}

/* =============================================================
   LOTTERY TRIAL — Prize Table
   ============================================================= */
.vqtg-prize-table {
  margin: 14px 0 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.vqtg-prize-table table { width: 100%; border-collapse: collapse; }
.vqtg-prize-table th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-align: left;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vqtg-prize-table td {
  padding: 9px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  vertical-align: middle;
}
.vqtg-prize-table tr:last-child td  { border-bottom: 0; }
.vqtg-prize-table tr:hover td       { background: rgba(255,255,255,.03); }
.vqtg-prize-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.vqtg-prize-num {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 14px;
  background: linear-gradient(135deg, #fff, #ffd36a);
  color: #160818;
  letter-spacing: 2px;
  box-shadow: 0 0 14px rgba(255,211,106,.2);
}
.vqtg-prize-placeholder {
  background: rgba(255,255,255,.08) !important;
  color: var(--muted) !important;
  letter-spacing: 4px;
  box-shadow: none !important;
}

/* =============================================================
   LUCKY NUMBER — Large Display + Copy
   ============================================================= */
.vqtg-lucky-num-display {
  margin: 18px 0;
  padding: 28px 20px;
  border-radius: 24px;
  background: rgba(255,211,106,.07);
  border: 1px solid rgba(255,211,106,.2);
  text-align: center;
}
.vqtg-lucky-num-value {
  font-size: 56px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(255,211,106,.5);
  letter-spacing: 4px;
  line-height: 1;
  margin-bottom: 18px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vqtg-copy-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.vqtg-copy-btn {
  padding: 8px 20px;
  border-radius: 12px;
  background: rgba(255,211,106,.15);
  border: 1px solid rgba(255,211,106,.3);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
  font-family: 'Be Vietnam Pro', sans-serif;
}
.vqtg-copy-btn:hover,
.vqtg-copy-btn.vqtg-copied {
  background: rgba(255,211,106,.3);
  border-color: rgba(255,211,106,.6);
}

/* =============================================================
   JACKPOT SPIN — Slot Reels
   ============================================================= */
.vqtg-jackpot-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.vqtg-jackpot-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.vqtg-jackpot-reels {
  display: flex;
  gap: 12px;
  align-items: stretch;
  justify-content: center;
}
.vqtg-reel {
  width: 80px;
  height: 100px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color .3s ease;
}
.vqtg-reel::before,
.vqtg-reel::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 28px;
  pointer-events: none;
  z-index: 2;
}
.vqtg-reel::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(6,4,12,.8), transparent);
}
.vqtg-reel::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(6,4,12,.8), transparent);
}
.vqtg-reel-current {
  font-size: 38px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(255,211,106,.5);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: color .15s;
}
.vqtg-reel.vqtg-reel-done {
  border-color: rgba(255,211,106,.6);
  box-shadow: 0 0 24px rgba(255,211,106,.25), inset 0 0 20px rgba(255,211,106,.05);
}
.vqtg-reel.vqtg-reel-done .vqtg-reel-current {
  color: #fff;
  text-shadow: 0 0 30px rgba(255,211,106,.8);
}

/* ── Energy Meter ── */
.vqtg-energy-wrap {
  width: 100%;
  max-width: 300px;
}
.vqtg-energy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.vqtg-energy-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vqtg-energy-val {
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
}
.vqtg-energy-track {
  height: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  border: 1px solid var(--line);
}
.vqtg-energy-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #ff9f2f, #ffd36a, #4dffad);
  width: 0;
  transition: width .05s linear;
  box-shadow: 0 0 12px rgba(255,211,106,.4);
}

/* ── Confetti Canvas ── */
#vqtgConfettiCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  border-radius: inherit;
  display: none;
}
.vqtg-jackpot-stage { position: relative; }

/* =============================================================
   RANDOM PICKER
   ============================================================= */
.vqtg-picker-col { width: 100%; }
.vqtg-picker-textarea {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 14px;
  font-weight: 600;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .2s;
}
.vqtg-picker-textarea:focus {
  outline: 0;
  border-color: rgba(255,211,106,.45);
  box-shadow: 0 0 20px rgba(255,211,106,.1);
}
.vqtg-picker-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.vqtg-picker-list {
  list-style: none;
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 14px;
  padding: 0;
}
.vqtg-picker-list::-webkit-scrollbar { width: 4px; }
.vqtg-picker-list::-webkit-scrollbar-track { background: transparent; }
.vqtg-picker-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.vqtg-picker-item {
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  transition: .18s ease;
  cursor: default;
}
.vqtg-picker-active {
  background: linear-gradient(135deg, rgba(255,211,106,.18), rgba(77,255,173,.12)) !important;
  border-color: rgba(255,211,106,.45) !important;
  color: var(--gold);
  transform: scale(1.02);
}
.vqtg-picker-result {
  margin: 16px 0;
  padding: 24px;
  border-radius: 22px;
  background: rgba(77,255,173,.08);
  border: 1px solid rgba(77,255,173,.25);
  text-align: center;
}
.vqtg-picker-result-text {
  font-size: 24px;
  font-weight: 900;
  color: var(--green);
  text-shadow: 0 0 30px rgba(77,255,173,.5);
  line-height: 1.3;
}

/* =============================================================
   CHALLENGE WHEEL — Canvas
   ============================================================= */
.vqtg-challenge-wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
#vqtgChallengeCanvas {
  border-radius: 50%;
  box-shadow:
    0 0 60px rgba(255,79,163,.25),
    0 0 120px rgba(141,92,255,.15);
  border: 3px solid rgba(255,211,106,.35);
  max-width: 300px;
  width: 100%;
  height: auto;
}
.vqtg-wheel-pointer {
  font-size: 28px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,211,106,.8);
  margin-top: -8px;
  position: relative;
  z-index: 2;
}
.vqtg-challenge-result {
  margin: 16px 0;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,79,163,.08);
  border: 1px solid rgba(255,79,163,.25);
}
.vqtg-challenge-result-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--pink);
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(255,79,163,.5);
}
.vqtg-challenge-result-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}
.vqtg-challenge-result-level {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
}

/* =============================================================
   DISCLAIMER
   ============================================================= */
.vqtg-disclaimer {
  margin-top: 28px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255,65,92,.06);
  border: 1px solid rgba(255,65,92,.18);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.vqtg-disclaimer__icon {
  flex-shrink: 0;
  font-size: 15px;
  margin-top: 1px;
}

/* =============================================================
   LUCKY CARD HOVER
   ============================================================= */
.vqtg-lucky-card { transition: .25s ease; }
.vqtg-lucky-card:hover {
  border-color: rgba(255,211,106,.3);
  transform: translateY(-4px);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 980px) {
  .vqtg-tool-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .vqtg-spinner-col {
    min-height: auto;
  }
  #vqtgLuckyCanvas,
  #vqtgChallengeCanvas { max-width: 260px; }
  .vqtg-result-ball  { width: 50px; height: 50px; font-size: 16px; }
  .vqtg-controls-col h2 { font-size: 24px; }
  .vqtg-reel { width: 68px; height: 86px; }
  .vqtg-reel-current { font-size: 30px; }
  .vqtg-lucky-num-value { font-size: 44px; }
}

@media (max-width: 620px) {
  #vqtgLuckyCanvas,
  #vqtgChallengeCanvas { max-width: 220px; }
  .vqtg-result-ball  { width: 44px; height: 44px; font-size: 14px; }
  .vqtg-prize-num    { font-size: 12px; padding: 3px 8px; }
  .vqtg-countdown    { font-size: 48px; }
  .vqtg-picker-result-text { font-size: 20px; }
  .vqtg-reel { width: 58px; height: 74px; }
  .vqtg-reel-current { font-size: 24px; }
  .vqtg-lucky-num-value { font-size: 36px; }
}
