/* ——— Wheel — exact Readdy structure + Oxino dark palette ——— */
.tabbar {
  grid-template-columns: repeat(4, 1fr);
}
.tabbar button {
  min-width: 0;
}
.tabbar button span:last-child {
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
  white-space: nowrap;
}

@keyframes wheelFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes wheelFloaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.wheel-page {
  padding: 0.75rem var(--page-pad) 0.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.wheel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.wheel-top-titles {
  min-width: 0;
  text-align: right;
}
.wheel-top-titles h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.wheel-top-titles p {
  margin: 0.15rem 0 0;
  font-size: 0.6875rem;
  color: var(--muted);
}
.wheel-hist-btn {
  position: relative;
  flex-shrink: 0;
  width: auto;
  gap: 0.375rem;
  padding: 0 0.75rem;
  height: 2.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 0.75rem;
}
.wheel-hist-btn i { font-size: 1.125rem; }
.wheel-hist-btn:active {
  background: var(--secondary);
}
/* Main card — Readdy rounded-3xl gradient panel */
.wheel-card {
  margin-top: 0.75rem;
  flex: 1;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    #2a3140 0%,
    rgba(35, 41, 56, 0.72) 100%
  );
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wheel-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(217, 119, 6, 0.18);
  color: #f0b35a;
  border: none;
}
.wheel-timer-pill.is-ready {
  background: rgba(217, 119, 6, 0.18);
  color: #f0b35a;
}
.wheel-timer-pill i {
  font-size: 0.875rem;
}
.wheel-timer-pill time,
.wheel-timer-pill .wheel-remain-num {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.wheel-stage-wrap {
  margin-top: 1rem;
  width: 100%;
  max-width: 17rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.wheel-glow {
  position: absolute;
  inset: -0.5rem;
  border-radius: 999px;
  background: rgba(79, 145, 214, 0.35);
  filter: blur(28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
  z-index: 0;
}
.wheel-glow.is-on {
  opacity: 1;
}

/* Gradient ring + pegs */
.wheel-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 7px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-400) 45%,
    var(--accent-600) 100%
  );
  box-sizing: border-box;
  z-index: 1;
}
.wheel-pegs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.wheel-peg {
  position: absolute;
  inset: 0;
}
.wheel-peg i {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 999px;
  background: #f5f7fb;
  box-shadow: 0 0 0 1px rgba(26, 31, 42, 0.15);
  display: block;
}

.wheel-disk-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid #f5f7fb;
  box-sizing: border-box;
  z-index: 1;
}

.wheel-disk {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  transform-origin: 50% 50%;
  transition: transform 4.2s cubic-bezier(0.16, 0.84, 0.24, 1);
  /* from -22.5deg → خانه ۰ دقیقاً زیر فلش بالا در حالت سکون */
  background: conic-gradient(
    from -22.5deg,
    #3d7ec4 0deg 45deg,
    #e08a2b 45deg 90deg,
    #3d7ec4 90deg 135deg,
    #e08a2b 135deg 180deg,
    #3d7ec4 180deg 225deg,
    #e08a2b 225deg 270deg,
    #3d7ec4 270deg 315deg,
    #e08a2b 315deg 360deg
  );
}
.wheel-disk.is-spinning {
  pointer-events: none;
}

.wheel-divider {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 50%;
  margin-left: -0.5px;
  background: rgba(245, 247, 251, 0.35);
  transform-origin: center bottom;
  pointer-events: none;
  z-index: 1;
}

.wheel-shine {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    circle at 50% 28%,
    rgba(245, 247, 251, 0.22),
    transparent 58%
  );
}

.wheel-label-slot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.wheel-label {
  position: absolute;
  inset-inline: 0;
  top: 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.wheel-label-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  line-height: 1;
}
.wheel-label b {
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

/* Pointer: orange dot + triangle (Readdy) */
.wheel-pointer {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -7px);
  pointer-events: none;
}
.wheel-pointer-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.wheel-pointer-arrow {
  margin-top: -3px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--accent);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
}

.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: 23%;
  height: 23%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 3px solid #f5f7fb;
  background: linear-gradient(145deg, #5a9fd4, #3d7ec4 55%, #2a5f9e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.wheel-hub i {
  animation: wheelFloaty 3s ease-in-out infinite;
}

.btn-wheel-spin {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.875rem 0;
  font-size: 0.875rem;
  font-weight: 700;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn-wheel-spin i {
  font-size: 1.125rem;
}
.btn-wheel-spin:disabled {
  opacity: 0.55;
  background: var(--secondary);
  color: var(--muted-3);
}
.btn-wheel-spin:active:not(:disabled) {
  transform: scale(0.98);
  background: var(--primary-400);
}

.wheel-hint {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--muted);
  line-height: 1.6;
}

.wheel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
  margin-top: 0.75rem;
}
.wheel-stat {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 0.4rem;
  text-align: center;
}
.wheel-stat strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wheel-stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.625rem;
  color: var(--muted);
}

.svc-tile {
  position: relative;
}
.svc-tile-gift {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid rgba(217, 119, 6, 0.4);
  font-size: 0.8rem;
  z-index: 2;
}

.wheel-hist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.wheel-hist-item:last-child {
  border-bottom: 0;
}
.wheel-hist-ico {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  background: var(--primary-soft);
  color: var(--primary-icon);
}
.wheel-hist-ico.is-wallet {
  background: rgba(34, 120, 80, 0.2);
  color: #6dcea0;
}
.wheel-hist-ico.is-discount {
  background: var(--primary-50);
  color: var(--primary-text);
}
.wheel-hist-ico.is-service {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.wheel-hist-ico.is-empty {
  background: var(--secondary);
  color: var(--muted);
}
.wheel-hist-body {
  flex: 1;
  min-width: 0;
}
.wheel-hist-body strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
}
.wheel-hist-body time {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  color: var(--muted);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}
.wheel-hist-meta {
  text-align: left;
  flex-shrink: 0;
}
.wheel-hist-meta .st {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted-3);
  font-weight: 600;
}
.wheel-hist-meta .code {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  color: var(--primary-text);
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 700;
}

.prize-popup-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--primary-soft);
  color: var(--primary-icon);
}
.prize-popup-icon.is-win {
  background: rgba(34, 120, 80, 0.22);
  color: #6dcea0;
}
.prize-popup-icon.is-empty {
  background: var(--secondary);
  color: var(--muted);
}
.prize-popup-title {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
}
.prize-popup-msg {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted-3);
  line-height: 1.7;
}
.prize-code-box {
  margin-top: 0.85rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(61, 126, 196, 0.45);
  background: var(--primary-50);
  padding: 0.75rem;
  text-align: center;
}
.prize-code-box strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--primary-text);
}
.prize-code-box span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.prize-copy-hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6dcea0;
}
.btn-sheet-primary.is-copied {
  background: rgba(34, 120, 80, 0.85);
}
.btn-sheet-primary.is-copied:active {
  background: rgba(34, 120, 80, 0.95);
}
.prize-creds {
  margin-top: 0.85rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.prize-creds-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}
.prize-creds-row + .prize-creds-row {
  border-top: 1px solid var(--border);
}
.prize-creds-row span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.prize-creds-row strong {
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  word-break: break-all;
}

@media (max-width: 380px) {
  .wheel-label b {
    font-size: 0.6rem;
  }
  .wheel-label-ico {
    font-size: 0.75rem;
  }
  .wheel-stat strong {
    font-size: 0.78rem;
  }
  .wheel-stage-wrap {
    max-width: 15.5rem;
  }
}
