/* ══════════════════════════════════════════════════════════════════════════
   ARYA UNO — ULTRA-PREMIUM TELEGRAM MINI APP (TMA) DESIGN SYSTEM
   Apple HIG & Telegram UI Native Design Engineering Standards (V3 Realistic)
   ══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700;800&display=swap');

:root {
  /* Dynamic Telegram Theme Colors with Deep Cyber Fallbacks */
  --tg-bg: var(--tg-theme-bg-color, #090c14);
  --tg-text: var(--tg-theme-text-color, #ffffff);
  --tg-hint: var(--tg-theme-hint-color, #8e9bb0);
  --tg-link: var(--tg-theme-link-color, #00f5d4);
  --tg-button: var(--tg-theme-button-color, #7209b7);
  --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
  --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #111624);
  --tg-header-bg: var(--tg-theme-header-bg-color, rgba(9, 12, 20, 0.88));

  /* Ultra-Luxe Realistic Palette */
  --bg-dark: #07090f;
  --bg-surface: rgba(16, 22, 36, 0.75);
  --bg-surface-elevated: rgba(24, 32, 50, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);

  --accent-gold: #ffd166;
  --accent-gold-glow: rgba(255, 209, 102, 0.4);
  --accent-silver: #d1d5db;
  --accent-bronze: #cd7f32;
  --accent-cyan: #00f5d4;
  --accent-cyan-glow: rgba(0, 245, 212, 0.35);
  --accent-purple: #7209b7;
  --accent-purple-glow: rgba(114, 9, 183, 0.4);
  --accent-red: #ef476f;
  --accent-blue: #118ab2;
  --accent-green: #06d6a0;
  --accent-orange: #ff9f1c;

  /* Viewport & Safe-Area Constants */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --dock-height: 64px;
  --header-height: 58px;

  /* Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Apple Spring & Smooth Easing Curves */
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── BASE RESET & BODY ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--tg-text);
  font-family: var(--font-main);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-y: visible;
  touch-action: pan-y;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  padding-top: calc(var(--safe-top) + var(--header-height) + 14px);
  padding-bottom: calc(var(--safe-bottom) + var(--dock-height) + 48px);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  background-image: 
    radial-gradient(circle at 20% 10%, rgba(114, 9, 183, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(0, 245, 212, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 209, 102, 0.05) 0%, transparent 55%);
  background-attachment: fixed;
}

/* ─── CONFETTI CANVAS ─────────────────────────────────────────────────── */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* ─── STICKY HEADER ──────────────────────────────────────────────────── */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--safe-top) + var(--header-height));
  padding-top: var(--safe-top);
  padding-left: max(16px, var(--safe-left));
  padding-right: max(16px, var(--safe-right));
  background: var(--tg-header-bg);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7209b7, #00f5d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 245, 212, 0.3);
}

.header-icon-svg {
  width: 20px;
  height: 20px;
}

.header-title-wrap {
  display: flex;
  flex-direction: column;
}

.header-app-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: linear-gradient(90deg, #ffffff 0%, #00f5d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-league-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-wallet-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(255, 209, 102, 0.12);
  transition: transform 0.15s var(--ease-spring), background 0.2s ease;
}

.header-wallet-btn:active {
  transform: scale(0.94);
  background: rgba(255, 209, 102, 0.22);
}

/* ─── FLOATING GLASS DOCK (REDESIGNED BOTTOM NAVIGATION) ─────────────── */
.bottom-dock-container {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 8px);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 150;
  padding: 0 10px;
  pointer-events: none;
}

.bottom-dock {
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  height: var(--dock-height);
  background: rgba(14, 19, 32, 0.92);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.75),
    0 0 20px rgba(0, 245, 212, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dock-item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--tg-hint);
  padding: 6px 2px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  position: relative;
  min-width: 0;
  user-select: none;
}

.dock-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.2s var(--ease-spring);
}

.dock-icon {
  width: 19px;
  height: 19px;
  transition: all 0.2s var(--ease-spring);
}

.dock-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.2s ease;
}

.dock-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.18), rgba(114, 9, 183, 0.24));
  border: 1px solid rgba(0, 245, 212, 0.35);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.2);
}

.dock-item.active .dock-icon {
  color: var(--accent-cyan);
  transform: translateY(-1px) scale(1.1);
  filter: drop-shadow(0 2px 6px rgba(0, 245, 212, 0.6));
}

.dock-item.active .dock-label {
  color: #ffffff;
  font-weight: 800;
}

.dock-item:active {
  transform: scale(0.92);
}

/* ─── APP CONTAINERS & PAGES ─────────────────────────────────────────── */
.app-container {
  max-width: 540px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-tab {
  display: none;
  animation: tabFadeIn 0.35s var(--ease-smooth);
}

.page-tab.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── SECTION TITLE HEADERS ──────────────────────────────────────────── */
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 4px 10px 4px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ─── GLASS CARDS & HERO ─────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease;
}

.hero-card {
  background: linear-gradient(145deg, rgba(22, 32, 54, 0.9) 0%, rgba(14, 20, 36, 0.75) 100%);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(0, 245, 212, 0.25);
  border-radius: 24px;
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 245, 212, 0.08);
}

.hero-card-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-cyan { background: rgba(0, 245, 212, 0.15); color: var(--accent-cyan); }
.badge-gold { background: rgba(255, 209, 102, 0.15); color: var(--accent-gold); }
.badge-purple { background: rgba(114, 9, 183, 0.18); color: #b5179e; }
.badge-green { background: rgba(6, 214, 160, 0.15); color: var(--accent-green); }

.card-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.card-description {
  font-size: 13px;
  color: var(--tg-hint);
  line-height: 1.4;
  margin-bottom: 14px;
}

/* ─── PROFILE HERO ───────────────────────────────────────────────────── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.avatar-wrapper {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, #7209b7, #00f5d4);
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(114, 9, 183, 0.35);
}

/* ─── CREATOR / ARCHITECT COSMIC PROFILE FRAME & AURA ─────────────────── */
@keyframes creatorCosmicRotate {
  0% {
    filter: hue-rotate(0deg) drop-shadow(0 0 12px rgba(0, 245, 212, 0.6));
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.6), 0 0 35px rgba(0, 245, 212, 0.4);
  }
  50% {
    filter: hue-rotate(180deg) drop-shadow(0 0 18px rgba(255, 215, 0, 0.8));
    box-shadow: 0 0 30px rgba(0, 245, 212, 0.8), 0 0 50px rgba(121, 40, 202, 0.6);
  }
  100% {
    filter: hue-rotate(360deg) drop-shadow(0 0 12px rgba(0, 245, 212, 0.6));
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.6), 0 0 35px rgba(0, 245, 212, 0.4);
  }
}

@keyframes creatorShimmerText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes crownBounce {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-50%) translateY(-4px) scale(1.1); }
}

.avatar-wrapper.creator-cosmic-frame {
  position: relative;
  background: linear-gradient(135deg, #ff007f, #ffd700, #00f5d4, #7928ca, #ff007f) !important;
  background-size: 300% 300% !important;
  animation: creatorCosmicRotate 6s ease-in-out infinite, creatorShimmerText 4s linear infinite !important;
  padding: 4px !important;
  border-radius: 24px !important;
}

.avatar-wrapper.creator-cosmic-frame::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 28px;
  background: linear-gradient(45deg, #00f5d4, #ff007f, #ffd700, #7928ca);
  background-size: 200% 200%;
  filter: blur(10px);
  opacity: 0.85;
  z-index: -1;
  animation: creatorShimmerText 3s linear infinite;
}

.creator-crown-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 1));
  animation: crownBounce 2.5s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}

.level-badge-float.creator-badge {
  background: linear-gradient(135deg, #ff007f, #7928ca) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  border: 2px solid #ffd700 !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8) !important;
  font-size: 10px !important;
  padding: 3px 8px !important;
}

.creator-name-shimmer {
  background: linear-gradient(90deg, #ffd700, #ff007f, #00f5d4, #7928ca, #ffd700) !important;
  background-size: 300% 300% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: creatorShimmerText 3s ease infinite !important;
  font-weight: 900 !important;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  display: inline-flex;
  align-items: center;
}

.creator-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid #ffd700;
  color: #ffd700;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
  margin-left: 6px;
  vertical-align: middle;
}

.creator-title-glow {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(121, 40, 202, 0.35)) !important;
  border: 1px solid rgba(255, 215, 0, 0.7) !important;
  color: #ffd700 !important;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.4) !important;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7) !important;
}

.avatar-img, .avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 19px;
  object-fit: cover;
  background: #141926;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.level-badge-float {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  color: #080b11;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 2px solid #080b11;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-name {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-title-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.25);
  padding: 3px 9px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

/* ─── XP PROGRESS BAR ────────────────────────────────────────────────── */
.xp-bar-container {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.xp-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.xp-meta-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--tg-hint);
  font-weight: 600;
}

.xp-meta-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.xp-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #7209b7, #00f5d4);
  border-radius: 10px;
  position: relative;
  transition: width 0.6s var(--ease-smooth);
}

.xp-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── STATS GRID ─────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: transform 0.15s var(--ease-spring);
}

.stat-box:active {
  transform: scale(0.95);
}

.stat-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-purple { background: rgba(114,9,183,0.18); color: var(--accent-purple); }
.stat-gold { background: rgba(255,209,102,0.18); color: var(--accent-gold); }
.stat-green { background: rgba(6,214,160,0.18); color: var(--accent-green); }
.stat-cyan { background: rgba(0,245,212,0.18); color: var(--accent-cyan); }
.stat-red { background: rgba(239,71,111,0.18); color: var(--accent-red); }
.stat-orange { background: rgba(255,159,28,0.18); color: var(--accent-orange); }
.stat-blue { background: rgba(17,138,178,0.18); color: var(--accent-blue); }
.stat-violet { background: rgba(142,68,173,0.18); color: #bf55ec; }

.stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--tg-hint);
  line-height: 1.2;
}

.stat-value {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
}

/* ─── BADGE PILLS ────────────────────────────────────────────────────── */
.badge-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-pill.gold {
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: var(--accent-gold);
}

.badge-pill.cyan {
  background: rgba(0, 245, 212, 0.15);
  border: 1px solid rgba(0, 245, 212, 0.35);
  color: var(--accent-cyan);
}

/* ─── BUTTONS ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 16px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  transition: transform 0.12s var(--ease-spring), filter 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
  filter: brightness(1.08);
}

.btn-primary {
  background: linear-gradient(135deg, #00f5d4, #00bbf9);
  color: #080b11;
  box-shadow: 0 6px 20px rgba(0, 245, 212, 0.35);
}

.btn-purple {
  background: linear-gradient(135deg, #7209b7, #9d4edd);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(114, 9, 183, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  color: #080b11;
  box-shadow: 0 6px 20px rgba(255, 209, 102, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12.5px;
  border-radius: 12px;
}

.btn-icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
}

/* ─── PILL TABS ──────────────────────────────────────────────────────── */
.pill-tabs-wrapper {
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pill-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.pill-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: 18px;
  gap: 4px;
  width: max-content;
  min-width: 100%;
}

.pill-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tg-hint);
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s var(--ease-spring);
}

.pill-tab.active {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.22), rgba(114, 9, 183, 0.32));
  color: #ffffff;
  border: 1px solid rgba(0, 245, 212, 0.4);
  box-shadow: 0 4px 15px rgba(0, 245, 212, 0.2);
}

.pill-tab:active {
  transform: scale(0.95);
}

/* ─── REALISTIC UNO 3D CARDS & THEME SHOWCASE ───────────────────────── */
.theme-carousel-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.theme-preview-card {
  background: rgba(16, 22, 36, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.theme-preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, linear-gradient(90deg, #00f5d4, #7b2cbf));
  opacity: 0.8;
}

.theme-preview-card.active-theme {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.22);
  background: linear-gradient(145deg, rgba(20, 34, 58, 0.95) 0%, rgba(14, 20, 36, 0.9) 100%);
}

.theme-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.theme-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-emoji {
  font-size: 20px;
  line-height: 1;
}

.theme-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.theme-meta-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-description {
  font-size: 13px;
  color: var(--tg-hint);
  line-height: 1.45;
  margin: 0;
}

/* Real Card WebP 3D Fan Spread */
.real-deck-fan-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0 12px 0;
  perspective: 1200px;
  user-select: none;
}

.real-deck-fan {
  position: relative;
  width: 220px;
  height: 125px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fan-card {
  position: absolute;
  width: 78px;
  height: 116px;
  border-radius: 10px;
  background: #11141c;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  transform-origin: 50% 120%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Specific angles and positions for the 4 fan cards */
.fan-card.c1 {
  transform: translateX(-48px) translateY(8px) rotate(-16deg);
  z-index: 1;
}
.fan-card.c2 {
  transform: translateX(-16px) translateY(2px) rotate(-5deg);
  z-index: 2;
}
.fan-card.c3 {
  transform: translateX(16px) translateY(2px) rotate(5deg);
  z-index: 3;
}
.fan-card.c4 {
  transform: translateX(48px) translateY(8px) rotate(16deg);
  z-index: 4;
}

/* Hover / touch interaction on the fan */
.real-deck-fan-wrapper:hover .fan-card.c1,
.real-deck-fan-wrapper:active .fan-card.c1 {
  transform: translateX(-62px) translateY(2px) rotate(-22deg) scale(1.04);
}
.real-deck-fan-wrapper:hover .fan-card.c2,
.real-deck-fan-wrapper:active .fan-card.c2 {
  transform: translateX(-20px) translateY(-6px) rotate(-7deg) scale(1.05);
}
.real-deck-fan-wrapper:hover .fan-card.c3,
.real-deck-fan-wrapper:active .fan-card.c3 {
  transform: translateX(20px) translateY(-6px) rotate(7deg) scale(1.05);
}
.real-deck-fan-wrapper:hover .fan-card.c4,
.real-deck-fan-wrapper:active .fan-card.c4 {
  transform: translateX(62px) translateY(2px) rotate(22deg) scale(1.04);
}

.fan-card:hover {
  z-index: 10 !important;
  transform: translateY(-16px) scale(1.15) rotate(0deg) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 245, 212, 0.35);
  border-color: #00f5d4;
}

/* Theme Action Buttons */
.theme-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 4px;
}

.btn-sticker-pack {
  background: rgba(41, 143, 255, 0.12);
  border: 1px solid rgba(41, 143, 255, 0.35);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-sticker-pack:hover,
.btn-sticker-pack:active {
  background: rgba(41, 143, 255, 0.22);
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ─── LIVE CHAT PREVIEW BOX ──────────────────────────────────────────── */
.chat-preview-box {
  background: rgba(8, 12, 20, 0.85);
  border: 1px dashed var(--border-subtle);
  border-radius: 16px;
  padding: 14px;
  margin-top: 4px;
}

.chat-bubble {
  background: #2b5278;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  display: inline-block;
  max-width: 92%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  position: relative;
}

.chat-sender {
  font-size: 13px;
  font-weight: 700;
  color: #70bdfb;
  margin-bottom: 3px;
}

.chat-message {
  font-size: 13.5px;
  line-height: 1.35;
}

.chat-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* ─── QUEST ITEMS ────────────────────────────────────────────────────── */
.quest-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s var(--ease-spring);
}

.quest-item.claimable {
  border-color: var(--accent-gold);
  background: linear-gradient(145deg, rgba(255, 209, 102, 0.08), rgba(18, 24, 38, 0.85));
  box-shadow: 0 6px 20px rgba(255, 209, 102, 0.15);
}

.quest-item.done {
  opacity: 0.7;
}

.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quest-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 245, 212, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quest-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.quest-reward-chip {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.15);
  padding: 3px 9px;
  border-radius: 10px;
}

/* ─── LEADERBOARD OLYMPIC PODIUM & LIST ──────────────────────────────── */
.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  margin: 16px 0 22px 0;
  padding: 0 4px;
}

.podium-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 12px 6px 10px 6px;
  position: relative;
  transition: transform 0.2s var(--ease-spring);
}

.podium-step.rank-1 {
  order: 2;
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.18) 0%, rgba(18, 24, 38, 0.92) 100%);
  box-shadow: 0 10px 30px rgba(255, 209, 102, 0.22);
  transform: translateY(-8px);
}

.podium-step.rank-2 {
  order: 1;
  border-color: var(--accent-silver);
  background: linear-gradient(180deg, rgba(209, 213, 219, 0.12) 0%, rgba(18, 24, 38, 0.9) 100%);
}

.podium-step.rank-3 {
  order: 3;
  border-color: var(--accent-bronze);
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.12) 0%, rgba(18, 24, 38, 0.9) 100%);
}

.podium-crown {
  position: absolute;
  top: -12px;
  color: var(--accent-gold);
  filter: drop-shadow(0 2px 8px rgba(255, 209, 102, 0.6));
}

.podium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #162032;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  margin-bottom: 4px;
}

.podium-step.rank-1 .podium-avatar {
  border-color: var(--accent-gold);
  width: 48px;
  height: 48px;
}

.podium-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  max-width: 75px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-score {
  font-size: 11.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  margin-top: 3px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leader-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 11px 14px;
  transition: transform 0.15s var(--ease-spring);
}

.leader-card:active {
  transform: scale(0.98);
}

.leader-card.current-user {
  border-color: var(--accent-cyan);
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.12), rgba(18, 24, 38, 0.85));
  box-shadow: 0 4px 18px rgba(0, 245, 212, 0.15);
}

.leader-rank-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--tg-hint);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.leader-card.rank-1 .leader-rank-badge { background: var(--accent-gold); color: #080b11; }
.leader-card.rank-2 .leader-rank-badge { background: var(--accent-silver); color: #080b11; }
.leader-card.rank-3 .leader-rank-badge { background: var(--accent-bronze); color: #080b11; }

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

.leader-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-user-sub {
  font-size: 11px;
  color: var(--tg-hint);
  margin-top: 2px;
}

.leader-score-wrap {
  text-align: right;
  flex-shrink: 0;
}

.leader-score-main {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.leader-score-title {
  font-size: 10px;
  color: var(--tg-hint);
  text-transform: uppercase;
}

/* ─── MODALS & BOTTOM SHEETS ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 250;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.bottom-sheet {
  background: #0f1524;
  border-top: 1px solid var(--border-glass);
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 540px;
  padding: 16px 20px calc(var(--safe-bottom) + 24px) 20px;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.65);
  animation: slideSheetUp 0.35s var(--ease-spring);
}

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

.sheet-handle {
  width: 38px;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  margin: 0 auto 16px auto;
}

.native-input {
  width: 100%;
  background: #172033;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 13px 14px;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.native-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.25);
}

/* ─── TOAST SYSTEM ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 68px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
  width: 90%;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 20, 32, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toastSlideDown 0.3s var(--ease-spring);
}

@keyframes toastSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── LUCKY WHEEL (ŞANS ÇARKI) STYLES ───────────────────────────────── */
.wheel-jackpot-banner {
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 209, 102, 0.08) 0%, rgba(114, 9, 183, 0.15) 100%), var(--bg-surface);
  border: 1px solid rgba(255, 209, 102, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 209, 102, 0.3);
}

.jackpot-badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.jackpot-sparkle-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.4);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.wheel-main-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #ffffff;
  margin: 4px 0 6px 0;
  background: linear-gradient(135deg, #ffffff 30%, #ffd166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wheel-sub-desc {
  font-size: 13px;
  color: var(--tg-hint);
  line-height: 1.4;
  margin: 0 auto 12px auto;
  max-width: 320px;
}

.wheel-timer-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f72585;
}

.status-indicator-dot.ready {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ─── WHEEL ARENA ────────────────────────────────────────────────────── */
.wheel-arena-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 20px 16px;
  margin-bottom: 14px;
}

.wheel-glow-backdrop {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(114, 9, 183, 0.35) 0%, rgba(0, 245, 212, 0.15) 50%, transparent 75%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

.wheel-pointer-container {
  position: relative;
  z-index: 20;
  margin-bottom: -18px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8));
}

.wheel-pointer-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pointerFloat 2s ease-in-out infinite;
}

@keyframes pointerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.wheel-stage {
  position: relative;
  width: 330px;
  height: 330px;
  max-width: 90vw;
  max-height: 90vw;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 50%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 209, 102, 0.25), inset 0 0 20px rgba(0, 0, 0, 0.8);
  background: #080b12;
  border: 5px solid #232a3d;
}

#luckyWheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.wheel-center-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe66d 0%, #ffd166 45%, #d49b28 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 209, 102, 0.75);
  cursor: pointer;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-spring);
}

.wheel-center-button:active {
  transform: translate(-50%, -50%) scale(0.92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.center-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.center-btn-text {
  font-size: 13px;
  font-weight: 900;
  color: #211202;
  letter-spacing: 0.5px;
}

.center-btn-sub {
  font-size: 8px;
  font-weight: 800;
  color: rgba(33, 18, 2, 0.7);
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ─── CONTROLS PANEL ─────────────────────────────────────────────────── */
.wheel-controls-panel {
  width: 100%;
  max-width: 360px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 15;
}

.wheel-action-btn {
  width: 100%;
  font-size: 15px;
  font-weight: 800;
  padding: 15px 20px;
  border-radius: 18px;
}

.wheel-secondary-actions {
  display: flex;
  gap: 10px;
}

.wheel-secondary-actions .btn {
  flex: 1;
  font-size: 13px;
  padding: 12px;
}

/* ─── RARITY TABLE ───────────────────────────────────────────────────── */
.rarity-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.rarity-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
}

.rarity-badge-row.legendary {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 0, 127, 0.15));
  border-color: rgba(255, 215, 0, 0.4);
}

.rarity-badge-row.epic {
  background: rgba(155, 93, 229, 0.12);
  border-color: rgba(155, 93, 229, 0.35);
}

.rarity-badge-row.rare {
  background: rgba(0, 245, 212, 0.08);
  border-color: rgba(0, 245, 212, 0.25);
}

.rarity-badge-row.common {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.rarity-tag-badge {
  font-weight: 800;
  font-size: 12px;
}

.rarity-badge-row.legendary .rarity-tag-badge { color: #ffd700; }
.rarity-badge-row.epic .rarity-tag-badge { color: #c77dff; }
.rarity-badge-row.rare .rarity-tag-badge { color: var(--accent-cyan); }
.rarity-badge-row.common .rarity-tag-badge { color: #adb5bd; }

.rarity-desc-text {
  font-size: 12px;
  color: #ffffff;
  font-weight: 600;
}

/* ─── RECENT WINNERS LIST ────────────────────────────────────────────── */
.recent-winners-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.winner-ticker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.winner-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #ffffff;
}

.winner-prize-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.winner-prize-text {
  font-weight: 800;
  color: var(--accent-gold);
}

.winner-time-ago {
  color: var(--tg-hint);
  font-size: 11px;
}

/* ─── PRIZE CELEBRATION MODAL ────────────────────────────────────────── */
.prize-celebration-sheet {
  text-align: center;
}

.prize-celebration-box {
  padding: 10px 0 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prize-sparkle-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.4) 0%, rgba(114, 9, 183, 0.3) 60%, transparent 80%);
  border: 2px solid rgba(255, 209, 102, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 0 35px rgba(255, 209, 102, 0.5);
  animation: prizeGlowPulse 2s infinite ease-in-out;
}

@keyframes prizeGlowPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 209, 102, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 50px rgba(255, 209, 102, 0.8); }
}

.prize-icon-display {
  font-size: 46px;
}

.prize-rarity-pill {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.2);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.prize-title-text {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
}

.prize-amount-text {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.prize-sub-desc {
  font-size: 13px;
  color: var(--tg-hint);
  max-width: 280px;
}

/* ─── TELEGRAM STARS (XTR) STORE ─────────────────────────────────────── */
.tg-stars-packages-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.tg-stars-pkg-card {
  background: rgba(14, 20, 32, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.tg-stars-pkg-card:active {
  transform: scale(0.98);
}

.tg-stars-pkg-card.highlight {
  border-color: rgba(255, 209, 102, 0.4);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.08), rgba(14, 20, 32, 0.9));
}

.tg-stars-pkg-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.tg-stars-pkg-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tg-stars-pkg-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tg-stars-pkg-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-gold);
  color: #080b11;
  text-transform: uppercase;
}

.tg-stars-pkg-desc {
  font-size: 12px;
  color: var(--tg-hint);
  margin-top: 2px;
  line-height: 1.3;
}

.tg-stars-btn-buy {
  background: linear-gradient(135deg, #0088cc 0%, #00a8ff 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tg-stars-btn-buy:active {
  transform: scale(0.94);
}

.dock-wheel-icon {
  color: var(--accent-gold) !important;
}

.dock-stars-icon {
  color: var(--accent-gold) !important;
}

.stars-store-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(114, 9, 183, 0.18));
  border-color: rgba(255, 209, 102, 0.35);
}

.stars-hero-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #ffffff;
  margin: 8px 0 6px 0;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ══════════════════════════════════════════════════════════════════════════
   CLAN MANAGEMENT & INTERACTIVE PROFILE CHIP SYSTEM
   ══════════════════════════════════════════════════════════════════════════ */
.player-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.player-clan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 245, 212, 0.15);
  transition: all 0.2s var(--ease-spring);
  user-select: none;
}

.player-clan-pill:active {
  transform: scale(0.94);
  background: rgba(0, 245, 212, 0.24);
}

.player-clan-pill.no-clan {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--tg-hint);
}

.clan-pill-icon {
  font-size: 13px;
  line-height: 1;
}

.clan-pill-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* Clan Bottom Sheet Modal */
.clan-sheet-modal {
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.clan-role-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 2px;
}

.clan-modal-scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.clan-summary-hero {
  background: linear-gradient(135deg, rgba(114, 9, 183, 0.25) 0%, rgba(0, 245, 212, 0.15) 100%);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.clan-hero-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.clan-hero-name {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.4px;
}

.clan-hero-leader-text {
  font-size: 12px;
  color: var(--tg-hint);
  margin-top: 2px;
}

.clan-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.clan-info-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.clan-info-box-label {
  font-size: 11px;
  color: var(--tg-hint);
  font-weight: 600;
}

.clan-info-box-val {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

/* Clan Invite Code Box */
.clan-code-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clan-code-display {
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed rgba(255, 209, 102, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-gold);
}

.clan-code-actions-row {
  display: flex;
  gap: 8px;
}

/* Clan Members Section */
.clan-members-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clan-section-header {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clan-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.clan-member-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clan-member-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.clan-member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7209b7, #3a86ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
  flex-shrink: 0;
}

.clan-member-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clan-member-meta {
  font-size: 11px;
  color: var(--tg-hint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.clan-member-role-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.2);
  color: var(--accent-gold);
}

.clan-kick-btn {
  background: rgba(239, 71, 111, 0.15);
  border: 1px solid rgba(239, 71, 111, 0.3);
  color: var(--accent-red);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.clan-kick-btn:active {
  transform: scale(0.92);
  background: rgba(239, 71, 111, 0.3);
}

/* Clan Leader Controls */
.clan-leader-panel {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.08), rgba(114, 9, 183, 0.12));
  border: 1px solid rgba(255, 209, 102, 0.3);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clan-level-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.clan-danger-panel {
  background: rgba(239, 71, 111, 0.08);
  border: 1px solid rgba(239, 71, 111, 0.25);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loading-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--tg-hint);
  font-size: 13px;
}

.spinner-circle {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 245, 212, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── FULL MOBILE RESPONSIVENESS (AUTO-FIT ACROSS ALL SCREENS) ── */
@media (max-width: 380px) {
  :root {
    --dock-height: 58px;
    --header-height: 52px;
  }

  body {
    padding-top: calc(var(--safe-top) + var(--header-height) + 8px);
    padding-bottom: calc(var(--safe-bottom) + var(--dock-height) + 36px);
  }

  .app-container {
    padding: 0 10px;
  }

  .bottom-dock-container {
    padding: 0 6px;
    bottom: calc(var(--safe-bottom) + 6px);
  }

  .bottom-dock {
    padding: 2px 4px;
    border-radius: 24px;
  }

  .dock-item {
    padding: 4px 1px;
    gap: 2px;
  }

  .dock-icon-wrapper {
    width: 22px;
    height: 22px;
  }

  .dock-icon {
    width: 17px;
    height: 17px;
  }

  .dock-label {
    font-size: 9px;
  }

  .wheel-stage {
    width: 290px;
    height: 290px;
  }

  .wheel-center-button {
    width: 66px;
    height: 66px;
  }

  .center-btn-text {
    font-size: 11.5px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .glass-card, .hero-card {
    padding: 14px;
    border-radius: 18px;
  }
}

@media (max-height: 680px) {
  .wheel-arena-card {
    padding: 12px 10px;
  }
  
  .wheel-stage {
    width: 275px;
    height: 275px;
  }
}


