/* ============================================================
   IMBA WAIFU — Enhanced UI with full animation system
   ============================================================ */

/* ── 1. TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:      #0a0518;
  --bg2:     #0e0a24;
  --surface: #150e2e;
  --surface2:#1a1338;
  --border:  rgba(180,150,255,.14);
  --text:    #f1eefc;
  --dim:     #8f88b8;
  --violet:  #8b3dff;
  --violet2: #c04dff;
  --gold:    #ffc857;
  --cyan:    #4fd6e8;
  --rose:    #ff5c92;
  --green:   #3ee08a;
  --ice:     #a8d8ff;
  --frost:   rgba(168,216,255,.12);
  --snow:    rgba(220,240,255,.9);
  --winter-grad: linear-gradient(135deg,#0f2a4a,#1a1050);
  --grad-brand:  linear-gradient(135deg,#7a2bf5,#c04dff);
  --grad-gold:   linear-gradient(135deg,#ffdb8a,#ff9f4a);
  --grad-cyan:   linear-gradient(135deg,#4fd6e8,#3d8bff);
  --radius:    16px;
  --radius-lg: 22px;
  --spring:    cubic-bezier(.22,1,.36,1);
  --bounce:    cubic-bezier(.34,1.56,.64,1);
  font-size: 16px;
}

/* ── 2. RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
h1,h2,.brandfont { font-family:'Baloo 2',system-ui,sans-serif; }

body {
  background:
    radial-gradient(700px 380px at 15% -8%, rgba(139,61,255,.28), transparent 60%),
    radial-gradient(600px 380px at 100% 10%, rgba(192,77,255,.16), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ── 3. APP SHELL ───────────────────────────────────────────── */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: 86px;
  position: relative;
}

/* ── 4. RIPPLE SYSTEM (works on every button) ───────────────── */
.ripple-host {
  position: relative;
  overflow: hidden;
}
.ripple-host .ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,.22);
  pointer-events: none;
  animation: rippleGrow .55s var(--spring) forwards;
}
@keyframes rippleGrow {
  to { transform: scale(4); opacity: 0; }
}

/* ── 5. TOPBAR ──────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,5,24,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.who { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 0 18px rgba(139,61,255,.55);
  transition: transform .2s var(--bounce), box-shadow .2s;
}
.avatar:active { transform: scale(.9); }

.who-text { display: flex; flex-direction: column; line-height: 1.15; }
.who-text b {
  font-family: 'Baloo 2'; font-size: 15px; letter-spacing: .02em;
  background: linear-gradient(90deg,#e6d6ff,#c891ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.who-text small { font-size: 8.5px; color: var(--dim); letter-spacing: .14em; }

.balances { display: flex; align-items: center; gap: 6px; }
.pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 10px;
  font-weight: 800; font-size: 12px; color: var(--text);
  transition: transform .15s var(--bounce);
  position: relative; overflow: hidden;
}
.pill:active { transform: scale(.93); }
.pill.diamond { color: var(--cyan); }
.pill.diamond i { color: var(--dim); font-style: normal; margin-left: 1px; }
.pill.coin { color: var(--gold); }
.pill.bell { position: relative; padding: 7px 9px; font-size: 14px; }
.pill .dot {
  position: absolute; top: -4px; right: -4px;
  background: var(--rose); color: #fff; font-size: 9px; font-weight: 800;
  border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,92,146,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(255,92,146,0); }
}

/* Balance pop-up animation (add class via JS on balance change) */
.balance-pop {
  animation: balPop .4s var(--bounce);
}
@keyframes balPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* Floating +/- label */
.balance-float {
  position: absolute;
  top: -26px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; font-weight: 800;
  animation: floatUp .8s ease-out forwards;
  pointer-events: none; white-space: nowrap; z-index: 99;
}
.balance-float.plus  { color: var(--green); }
.balance-float.minus { color: var(--rose); }
@keyframes floatUp {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-28px); }
}

/* ── 6. LEVEL BAR ───────────────────────────────────────────── */
.levelbar {
  width: calc(100% - 28px); margin: 2px 14px 10px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 9px 12px;
  text-align: left; color: var(--text);
  transition: transform .15s var(--bounce), box-shadow .2s;
}
.levelbar:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139,61,255,.2); }
.levelbar:active { transform: scale(.98); }

.lvicon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  box-shadow: 0 0 14px rgba(139,61,255,.5);
  animation: iconBreath 3s ease-in-out infinite;
}
@keyframes iconBreath {
  0%,100% { box-shadow: 0 0 14px rgba(139,61,255,.5); }
  50%      { box-shadow: 0 0 28px rgba(192,77,255,.8); }
}
.lvmid { flex: 1; min-width: 0; }
.lvtop { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.lvtop b { font-size: 13px; }
.lvtop small { font-size: 10px; color: var(--dim); }
.xpbar { height: 6px; border-radius: 99px; background: #241a44; overflow: hidden; }
.xpfill {
  height: 100%;
  background: linear-gradient(90deg, #7a2bf5, #c04dff, #ff9be0, #c04dff, #7a2bf5);
  background-size: 200% 100%;
  border-radius: 99px;
  transition: width .7s var(--spring);
  animation: xpShimmer 2.5s linear infinite;
}
@keyframes xpShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.xptext { font-size: 9.5px; color: var(--dim); margin-top: 3px; display: block; }
.lvchev { color: var(--dim); font-size: 20px; }

/* ── 7. QUICK ROW ───────────────────────────────────────────── */
.quickrow {
  display: grid; grid-auto-flow: column; grid-auto-columns: 64px;
  gap: 10px; overflow-x: auto; padding: 2px 14px 16px;
  scrollbar-width: none;
}
.quickrow::-webkit-scrollbar { display: none; }

.qbtn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; color: var(--dim);
  font-size: 9.5px; font-weight: 700;
  transition: color .2s, transform .15s var(--bounce);
}
.qbtn:active { transform: scale(.88); }
.qbtn:hover  { color: var(--text); }

.qicon {
  width: 48px; height: 48px; border-radius: 14px; position: relative;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  transition: background .2s, border-color .2s, transform .15s var(--bounce), box-shadow .2s;
}
.qbtn:hover  .qicon { background: var(--surface2); border-color: rgba(192,77,255,.3); box-shadow: 0 0 12px rgba(139,61,255,.2); }
.qbtn:active .qicon { transform: scale(.88); }

.qicon .dot {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rose); border: 2px solid var(--bg);
}
.qicon .badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--violet2); color: #fff; font-size: 9px; font-weight: 800;
  border-radius: 99px; padding: 1px 5px; border: 2px solid var(--bg);
}

/* ── 8. VIEW TRANSITIONS ────────────────────────────────────── */
.views { padding: 0 14px; }
.view  { display: none; }
.view.active {
  display: block;
  animation: viewSlideIn .32s var(--spring);
}
.view.slide-back {
  animation: viewSlideBack .32s var(--spring);
}
@keyframes viewSlideIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes viewSlideBack {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: none; }
}

/* ── 9. HERO SECTION ────────────────────────────────────────── */
.hero {
  border-radius: var(--radius-lg);
  padding: 26px 20px; margin-bottom: 14px;
  background:
    radial-gradient(220px 160px at 85% 0%, rgba(192,77,255,.45), transparent 70%),
    linear-gradient(160deg, #1c1140, #0c0722 75%);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% -20%, rgba(100,160,255,.07) 0%, transparent 70%);
  pointer-events: none;
}
/* Animated shimmer line across hero */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
  animation: heroShine 4s ease-in-out infinite;
}
@keyframes heroShine {
  0%   { left: -100%; }
  50%  { left: 150%; }
  100% { left: 150%; }
}
.hero small {
  color: var(--violet2); font-weight: 800;
  letter-spacing: .16em; font-size: 10px;
}
.hero h1 {
  font-size: 34px; margin: 8px 0 4px; line-height: 1;
  animation: heroFloat 4s ease-in-out infinite;
}
@keyframes heroFloat {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-3px); }
}
.hero h1 span {
  background: linear-gradient(90deg, #c891ff, #ff9be0, #c891ff);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: textFlow 3s linear infinite;
}
@keyframes textFlow {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.hero p { color: var(--dim); font-size: 12.5px; margin: 0 0 16px; max-width: 80%; }

.cta {
  background: var(--grad-brand); border: none; color: #fff;
  font-weight: 800; font-size: 13px;
  padding: 11px 16px; border-radius: 12px;
  box-shadow: 0 8px 22px -6px rgba(139,61,255,.7);
  transition: transform .15s var(--bounce), box-shadow .2s;
  position: relative; overflow: hidden;
}
.cta:hover  { transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(139,61,255,.85); }
.cta:active { transform: scale(.95); box-shadow: 0 4px 14px -4px rgba(139,61,255,.6); }

/* ── 10. FEATURED BANNER ────────────────────────────────────── */
.featuredbanner {
  border-radius: 16px; padding: 12px 14px; margin-bottom: 16px;
  background: linear-gradient(120deg, #3a1a4a, #1a0e2e);
  border: 1px solid rgba(255,140,200,.35);
}
.ftag { font-size: 9px; font-weight: 800; letter-spacing: .08em; color: var(--rose); }
.fbody { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.fart {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex: none;
}
.fbody b { display: block; font-size: 12.5px; }
.fbody small { color: var(--dim); font-size: 10px; }
.limited-badge {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(255,92,146,.9); color: #fff;
  font-size: 7px; font-weight: 800; padding: 2px 6px; border-radius: 99px;
}

/* ── 11. QUICK CARDS ────────────────────────────────────────── */
.quickcards {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 22px;
}
.qcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 8px;
  text-align: center; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .2s var(--bounce), box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.qcard:hover  { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(139,61,255,.2); border-color: rgba(192,77,255,.3); }
.qcard:active { transform: scale(.94); }
.qcard span { font-size: 20px; }
.qcard b    { font-size: 11px; }
.qcard small{ font-size: 8.5px; color: var(--dim); }
.qcard.chest {
  border-color: rgba(255,200,87,.4);
  background: linear-gradient(160deg, #241a3a, #150e2e);
}
.qcard.chest:hover {
  border-color: rgba(255,200,87,.7);
  box-shadow: 0 10px 24px rgba(255,200,87,.15);
}

/* ── 12. SECTION HEADER ─────────────────────────────────────── */
.sectionhead {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.sectionhead h2 { font-size: 15px; margin: 0; }
.link { background: none; border: none; color: var(--violet2); font-weight: 800; font-size: 11px; }

/* ── 13. CARD GRID & TILES ──────────────────────────────────── */
.cardgrid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 20px;
}
.cardgrid.wide { grid-template-columns: repeat(2,1fr); }

/* Staggered entrance for each tile */
.cardgrid .cardtile:nth-child(1)  { animation-delay:  0ms; }
.cardgrid .cardtile:nth-child(2)  { animation-delay: 40ms; }
.cardgrid .cardtile:nth-child(3)  { animation-delay: 80ms; }
.cardgrid .cardtile:nth-child(4)  { animation-delay:120ms; }
.cardgrid .cardtile:nth-child(5)  { animation-delay:160ms; }
.cardgrid .cardtile:nth-child(6)  { animation-delay:200ms; }
.cardgrid .cardtile:nth-child(7)  { animation-delay:240ms; }
.cardgrid .cardtile:nth-child(8)  { animation-delay:280ms; }
.cardgrid .cardtile:nth-child(9)  { animation-delay:320ms; }
.cardgrid .cardtile:nth-child(n+10){ animation-delay:360ms; }

.cardtile {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column;
  transition: transform .22s var(--bounce), box-shadow .22s, border-color .22s;
  animation: cardEntrance .4s var(--spring) both;
  will-change: transform;
}
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.cardtile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
  border-color: rgba(192,77,255,.3);
  z-index: 2;
}
.cardtile:active { transform: scale(.96); }

.cardart {
  aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; position: relative; overflow: hidden;
}
/* Shimmer overlay on hover */
.cardart::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.1) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform .5s;
}
.cardtile:hover .cardart::after { transform: translateX(100%); }

.rarity-tag {
  position: absolute; top: 6px; left: 6px;
  font-size: 7.5px; font-weight: 800; letter-spacing: .05em;
  padding: 2px 6px; border-radius: 99px;
  background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
}
.cardbody { padding: 8px; }
.cardbody b {
  display: block; font-size: 11px; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cardprice {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px; color: var(--gold); font-weight: 800; margin-bottom: 7px;
}
.buybtn {
  width: 100%; border: none; background: var(--grad-brand);
  color: #fff; font-weight: 800; font-size: 10.5px;
  padding: 7px; border-radius: 9px;
  transition: opacity .2s, transform .15s var(--bounce);
}
.buybtn:hover  { opacity: .9; }
.buybtn:active { transform: scale(.94); }

/* Rarity themes */
.r-Ordinary .cardart { background: radial-gradient(circle,#3a4258,#171b2a 65%); }
.r-Ordinary .rarity-tag { color: #c6ccdd; }
.r-Rare .cardart { background: radial-gradient(circle,#2a5fae,#101a30 65%); }
.r-Rare .rarity-tag { color: #8ec4ff; }
.r-Special .cardart { background: radial-gradient(circle,#2f7d8f,#0e1f26 65%); }
.r-Special .rarity-tag { color: var(--cyan); }
.r-Legend .cardart { background: radial-gradient(circle,#a3752b,#241a0a 65%); }
.r-Legend .rarity-tag { color: var(--gold); }
.r-Galaxy .cardart {
  background: radial-gradient(circle,#7d2bc9,#170c2c 65%);
  animation: galaxyPulse 2.5s ease-in-out infinite;
}
.r-Galaxy .rarity-tag { color: var(--violet2); }
@keyframes galaxyPulse {
  0%,100% { box-shadow: inset 0 0 30px rgba(139,61,255,.3); }
  50%      { box-shadow: inset 0 0 60px rgba(192,77,255,.6); }
}
.r-Unique .cardart {
  background: radial-gradient(circle,#c92b6e,#2c0c1a 65%);
  animation: uniqueAura 1.8s ease-in-out infinite;
}
.r-Unique .rarity-tag { color: var(--rose); }
@keyframes uniqueAura {
  0%,100% { box-shadow: inset 0 0 40px rgba(255,92,146,.3); }
  50%      { box-shadow: inset 0 0 80px rgba(255,92,146,.7); }
}

/* Galaxy / Unique border glow on whole tile */
.r-Galaxy.cardtile { border-color: rgba(139,61,255,.4); }
.r-Unique.cardtile  { border-color: rgba(255,92,146,.4); animation: uniqueTilePulse 2s infinite; }
@keyframes uniqueTilePulse {
  0%,100% { border-color: rgba(255,92,146,.4); box-shadow: 0 0 0 0 rgba(255,92,146,0); }
  50%      { border-color: rgba(255,92,146,.9); box-shadow: 0 0 18px rgba(255,92,146,.3); }
}

/* ── 14. SKELETON LOADER ────────────────────────────────────── */
.skeleton-tile {
  border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
}
.skeleton-art { aspect-ratio: 3/4; }
.skeleton-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.skeleton-line {
  border-radius: 6px; height: 10px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
.skeleton-line.short { width: 60%; }
.skeleton-art .skeleton-line {
  height: 100%; border-radius: 0;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── 15. PANELS & THREE-COL ─────────────────────────────────── */
.threecol { display: grid; gap: 12px; margin-bottom: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 13px;
  transition: border-color .2s;
}
.panelhead {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; margin-bottom: 10px;
}
.progressline {
  height: 6px; border-radius: 99px;
  background: #241a44; overflow: hidden; margin-bottom: 5px;
}
.progressfill {
  height: 100%; background: var(--grad-cyan);
  transition: width .6s var(--spring);
}
#missionCount { color: var(--dim); font-size: 10px; }
.missionlist {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.missionlist li {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px;
  transition: opacity .3s;
}
.missionlist li b { color: var(--gold); font-weight: 800; }
.missionlist li.done { color: var(--dim); text-decoration: line-through; opacity: .6; }
.mcheck {
  width: 14px; height: 14px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; margin-right: 6px;
  background: #241a44; color: transparent;
  transition: background .3s, transform .3s var(--bounce);
}
.missionlist li.done .mcheck {
  background: var(--green); color: #fff;
  transform: scale(1.2);
}

.salecard { display: flex; align-items: center; gap: 10px; }
.salecard .thumb {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex: none;
}
.salecard b { display: block; font-size: 11.5px; }
.salecard small { color: var(--gold); font-weight: 800; font-size: 10.5px; }

.ranklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ranklist li {
  display: flex; align-items: center; gap: 8px; font-size: 11px;
  animation: rankIn .35s var(--spring) both;
}
.ranklist li:nth-child(1) { animation-delay:  0ms; }
.ranklist li:nth-child(2) { animation-delay: 60ms; }
.ranklist li:nth-child(3) { animation-delay:120ms; }
@keyframes rankIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: none; }
}
.ranklist b { width: 16px; color: var(--dim); }
.ranklist span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranklist small { color: var(--gold); font-weight: 800; }
.ranklist li:nth-child(1) b { color: var(--gold); }
.ranklist li:nth-child(2) b { color: #c0c0c0; }
.ranklist li:nth-child(3) b { color: #cd7f32; }

/* ── 16. DAILY CHEST BANNER ─────────────────────────────────── */
.dailychest {
  width: 100%; margin-bottom: 20px;
  border: 1px solid rgba(255,200,87,.35); border-radius: 16px;
  background: linear-gradient(120deg, #2c1b45, #170e2e);
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; color: var(--text);
  transition: transform .2s var(--bounce), box-shadow .2s, border-color .2s;
}
.dailychest:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255,200,87,.12);
  border-color: rgba(255,200,87,.6);
}
.dailychest:active { transform: scale(.97); }
.dailychest b { font-family: 'Baloo 2'; font-size: 14px; }
.dailychest small {
  display: block; color: var(--dim); font-size: 9.5px;
  margin-top: 2px; max-width: 180px; text-align: left;
}
.chestbtn {
  background: var(--grad-gold); color: #2a1500;
  font-weight: 800; font-size: 11px; padding: 9px 12px;
  border-radius: 10px; flex: none;
  transition: transform .15s var(--bounce), box-shadow .2s;
}
.chestbtn:hover  { transform: scale(1.05); box-shadow: 0 6px 16px rgba(255,200,87,.3); }
.chestbtn:active { transform: scale(.94); }
.dailychest.claimed { opacity: .5; pointer-events: none; }

/* ── 17. VIEW HEADS & TABS ──────────────────────────────────── */
.viewhead { padding-top: 4px; margin-bottom: 12px; }
.viewhead h2 { font-size: 18px; margin: 0; }

.tabs {
  display: flex; gap: 8px; margin-bottom: 14px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--dim); padding: 8px 14px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s var(--bounce);
}
.tab:hover  { border-color: rgba(192,77,255,.3); color: var(--text); }
.tab:active { transform: scale(.94); }
.tab.active {
  background: var(--grad-brand); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(139,61,255,.4);
}

/* ── 18. MARKET ─────────────────────────────────────────────── */
.statrow { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 14px; }
.statrow .sbox {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px; text-align: center;
  transition: transform .2s var(--bounce);
}
.statrow .sbox:hover { transform: translateY(-2px); }
.statrow .sbox b    { display: block; font-size: 14px; }
.statrow .sbox small{ font-size: 8.5px; color: var(--dim); }

.listrows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.listrow {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 9px;
  transition: transform .2s var(--bounce), border-color .2s, box-shadow .2s;
  animation: listRowIn .3s var(--spring) both;
}
@keyframes listRowIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}
.listrow:hover {
  transform: translateX(2px);
  border-color: rgba(192,77,255,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.listrow .thumb {
  width: 46px; height: 46px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex: none;
}
.listrow .info { flex: 1; min-width: 0; }
.listrow .info b { display: block; font-size: 11.5px; }
.listrow .info small { color: var(--dim); font-size: 9.5px; }
.listrow .price { color: var(--gold); font-weight: 800; font-size: 11.5px; margin-right: 2px; }
.listrow .actbtn {
  border: none; background: var(--grad-brand);
  color: #fff; font-weight: 800; font-size: 10.5px;
  padding: 8px 12px; border-radius: 9px;
  transition: transform .15s var(--bounce), opacity .2s;
}
.listrow .actbtn:hover  { opacity: .9; }
.listrow .actbtn:active { transform: scale(.9); }
.listrow .actbtn.sell   { background: var(--grad-cyan); }
.listrow .actbtn.gift   { background: linear-gradient(135deg,#5b69ff,#9b59f5); margin-left: 4px; }

.listrow-heading {
  color: var(--dim); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  margin: 14px 4px 6px;
}
.listrow-heading:first-child { margin-top: 0; }

/* ── 19. GAMES ──────────────────────────────────────────────── */
.gamegrid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 14px;
}
.gametile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; text-align: left;
  transition: transform .2s var(--bounce), box-shadow .2s, border-color .2s;
  animation: cardEntrance .4s var(--spring) both;
}
.gametile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
  border-color: rgba(168,216,255,.3);
}
.gametile:active { transform: scale(.96); }
.gametile span  { font-size: 22px; display: block; margin-bottom: 6px; }
.gametile b     { display: block; font-size: 12px; margin-bottom: 2px; }
.gametile small { color: var(--dim); font-size: 9px; display: block; margin-bottom: 8px; }
.gametile .gobtn {
  border: none; background: var(--grad-brand);
  color: #fff; font-weight: 800; font-size: 10px;
  padding: 6px 8px; border-radius: 8px; width: 100%;
  transition: transform .15s var(--bounce), box-shadow .2s;
}
.gametile .gobtn:hover  { box-shadow: 0 4px 12px rgba(139,61,255,.4); }
.gametile .gobtn:active { transform: scale(.92); }

.freezenote {
  background: linear-gradient(135deg,rgba(15,35,70,.85),rgba(17,17,42,.9));
  border: 1px solid rgba(168,216,255,.2);
  border-radius: 12px; padding: 10px 14px;
  color: var(--ice); font-size: 12px;
  display: flex; align-items: center; gap: 6px; margin: 8px 0;
}
.freezenote::before { content: '🧊'; font-size: 18px; }

/* ── 20. PROFILE ────────────────────────────────────────────── */
.profilecard {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 4px; margin-bottom: 14px;
}
.avatar.big {
  width: 56px; height: 56px; font-size: 22px;
  background-size: cover; background-position: center; overflow: hidden;
  transition: transform .2s var(--bounce), box-shadow .2s;
}
.avatar.big:hover { transform: scale(1.08); box-shadow: 0 0 22px rgba(139,61,255,.6); }
.avatar.big img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profilecard b { display: block; font-size: 15px; }
.profilecard small { color: var(--dim); font-size: 10px; }
.vip {
  margin-left: auto;
  background: var(--grad-gold); color: #2a1500;
  font-weight: 800; font-size: 10px; padding: 5px 9px; border-radius: 99px;
  animation: vipGlow 2s ease-in-out infinite;
}
@keyframes vipGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,200,87,0); }
  50%      { box-shadow: 0 0 12px rgba(255,200,87,.4); }
}

.statgrid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 16px;
}
.statbox {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 6px; text-align: center;
  transition: transform .2s var(--bounce), box-shadow .2s;
}
.statbox:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.statbox span  { font-size: 18px; }
.statbox b     { display: block; font-size: 13px; margin: 4px 0 1px; }
.statbox small { color: var(--dim); font-size: 8.5px; }

.menulist {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin-bottom: 18px;
}
.menuitem {
  display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); padding: 14px; font-size: 12.5px; text-align: left;
  transition: background .2s, padding-left .2s;
}
.menuitem:hover  { background: rgba(255,255,255,.03); padding-left: 18px; }
.menuitem:active { background: rgba(255,255,255,.06); }
.menuitem:last-child { border-bottom: none; }
.menuitem span:last-child { color: var(--dim); transition: transform .2s; }
.menuitem:hover span:last-child { transform: translateX(3px); }

.logoutbtn {
  width: 100%; background: none;
  border: 1px solid rgba(255,92,146,.4); color: var(--rose);
  font-weight: 800; padding: 13px; border-radius: 12px; margin-bottom: 10px;
  transition: background .2s, transform .15s var(--bounce);
}
.logoutbtn:hover  { background: rgba(255,92,146,.08); }
.logoutbtn:active { transform: scale(.97); }

.textfield {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: inherit;
  font-size: 12.5px; padding: 11px 12px; margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.textfield:focus {
  outline: none;
  border-color: rgba(192,77,255,.5);
  box-shadow: 0 0 0 3px rgba(139,61,255,.15);
}
.settingrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; font-size: 12.5px;
  border-bottom: 1px solid var(--border);
}
.settingrow:last-of-type { border-bottom: none; }
.settingrow input[type=checkbox] { width: 40px; height: 22px; accent-color: var(--violet); }

/* ── 21. CHAT ───────────────────────────────────────────────── */
.chatbox {
  display: flex; flex-direction: column; gap: 8px;
  height: calc(100dvh - 340px); min-height: 280px;
  overflow-y: auto; padding: 4px 2px 10px; margin-bottom: 10px;
}
.chatmsg {
  max-width: 78%; padding: 8px 11px; border-radius: 13px;
  font-size: 12px; background: var(--surface); border: 1px solid var(--border);
  animation: msgIn .25s var(--spring);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.chatmsg b { display: block; font-size: 9.5px; color: var(--violet2); margin-bottom: 2px; }
.chatmsg.mine {
  align-self: flex-end;
  background: var(--grad-brand); color: #fff; border: none;
}
.chatmsg.mine b { color: rgba(255,255,255,.75); }
.chatrank { color: var(--gold); font-style: normal; font-weight: 700; }
.chatmsg-row { display: flex; align-items: flex-end; gap: 7px; }
.chatmsg-row.mine { justify-content: flex-end; }
.chatavatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--grad-brand); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.chatinput { display: flex; gap: 8px; position: sticky; bottom: 8px; }
.chatinput input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: 11px 15px;
  color: var(--text); font-size: 12.5px; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.chatinput input:focus {
  outline: none;
  border-color: rgba(192,77,255,.4);
  box-shadow: 0 0 0 3px rgba(139,61,255,.12);
}
.chatinput button {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--grad-brand); color: #fff; font-size: 16px; flex: none;
  transition: transform .15s var(--bounce), box-shadow .2s;
}
.chatinput button:hover  { box-shadow: 0 4px 14px rgba(139,61,255,.5); }
.chatinput button:active { transform: scale(.88); }

/* ── 22. BOTTOM NAV ─────────────────────────────────────────── */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5,1fr);
  background: rgba(14,9,32,.92); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.navbtn {
  background: none; border: none; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 700; padding: 4px;
  transition: color .2s, transform .2s var(--bounce);
  position: relative;
}
.navbtn:active { transform: scale(.86); }
.navbtn span { font-size: 18px; transition: transform .25s var(--bounce); }
.navbtn.active { color: var(--violet2); }
.navbtn.active span {
  transform: translateY(-3px) scale(1.15);
  filter: drop-shadow(0 0 6px rgba(192,77,255,.7));
}
/* Active indicator dot */
.navbtn.active::after {
  content: '';
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 99px;
  background: var(--violet2);
  box-shadow: 0 0 8px var(--violet2);
  animation: navDotPop .3s var(--bounce);
}
@keyframes navDotPop {
  from { width: 0; opacity: 0; }
  to   { width: 18px; opacity: 1; }
}

/* ── 23. TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 96px;
  transform: translateX(-50%) translateY(16px);
  background: #1e1440; border: 1px solid var(--border);
  color: var(--text); padding: 11px 18px; border-radius: 99px;
  font-size: 12px; font-weight: 700;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--bounce);
  z-index: 50;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.6);
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 24. CARD EVENT OVERLAY ─────────────────────────────────── */
/* Fix: HTML [hidden] must always hide modal overlays. */
.cardevent-overlay[hidden] { display: none !important; }

.cardevent-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,3,16,.86); backdrop-filter: blur(6px);
  padding: 24px;
  animation: cardevent-fadein .25s ease-out;
}
@keyframes cardevent-fadein { from { opacity: 0; } to { opacity: 1; } }

.cardevent-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cardevent-confetti span {
  position: absolute; top: -10%; width: 8px; height: 14px; opacity: .9;
  animation: cardevent-fall linear forwards;
  border-radius: 2px;
}
@keyframes cardevent-fall {
  to { transform: translateY(120vh) rotate(540deg); opacity: 0; }
}

.cardevent-sheet {
  position: relative; width: 100%; max-width: 360px; text-align: center;
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 22px 22px;
  animation: cardevent-pop .4s cubic-bezier(.2,1.5,.4,1);
}
@keyframes cardevent-pop {
  from { transform: scale(.8) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.cardevent-icon {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.cardevent-icon span { line-height: 1; }
.cardevent-title {
  margin: 0 0 6px; font-size: 20px;
  font-family: 'Baloo 2', system-ui, sans-serif; letter-spacing: .02em;
}
.cardevent-sub { margin: 0 0 18px; color: var(--dim); font-size: 13.5px; }
.cardevent-card {
  border-radius: var(--radius); padding: 22px 16px 16px; margin-bottom: 16px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.06), transparent 60%), var(--surface);
  border: 1px solid var(--border); position: relative;
}
.cardevent-rarity {
  position: absolute; top: 10px; right: 12px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--dim);
  background: rgba(255,255,255,.06); padding: 3px 8px; border-radius: 20px;
}
.cardevent-art { font-size: 56px; margin-bottom: 10px; }
.cardevent-name { display: block; font-size: 16px; }
.cardevent-id   { color: var(--dim); font-size: 12px; }
.cardevent-fields {
  text-align: left; background: rgba(255,255,255,.03);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 18px;
}
.cardevent-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 4px 0; font-size: 13px;
}
.cardevent-row span { color: var(--dim); }
.cardevent-btn {
  width: 100%; border: none; border-radius: 14px;
  padding: 14px; font-size: 15px; font-weight: 700; color: #0a0518;
  transition: transform .15s var(--bounce), opacity .2s;
}
.cardevent-btn:hover  { opacity: .9; }
.cardevent-btn:active { transform: scale(.96); }

/* Per-type accents */
.cardevent-overlay[data-type="bought"] .cardevent-icon { background: rgba(62,224,138,.15); color: var(--green); box-shadow: 0 0 0 1px rgba(62,224,138,.35); }
.cardevent-overlay[data-type="bought"] .cardevent-title { color: var(--green); }
.cardevent-overlay[data-type="bought"] .cardevent-card  { box-shadow: 0 0 30px -6px rgba(62,224,138,.35); border-color: rgba(62,224,138,.35); }
.cardevent-overlay[data-type="bought"] .cardevent-btn   { background: var(--green); }
.cardevent-overlay[data-type="sold"]   .cardevent-icon  { background: rgba(255,200,87,.15); color: var(--gold); box-shadow: 0 0 0 1px rgba(255,200,87,.35); }
.cardevent-overlay[data-type="sold"]   .cardevent-title { color: var(--gold); }
.cardevent-overlay[data-type="sold"]   .cardevent-card  { box-shadow: 0 0 30px -6px rgba(255,200,87,.35); border-color: rgba(255,200,87,.35); }
.cardevent-overlay[data-type="sold"]   .cardevent-btn   { background: var(--gold); }
.cardevent-overlay[data-type="returned"] .cardevent-icon { background: rgba(255,77,77,.15); color: #ff4d4d; box-shadow: 0 0 0 1px rgba(255,77,77,.35); }
.cardevent-overlay[data-type="returned"] .cardevent-title { color: #ff4d4d; }
.cardevent-overlay[data-type="returned"] .cardevent-card { box-shadow: 0 0 30px -6px rgba(255,77,77,.35); border-color: rgba(255,77,77,.35); }
.cardevent-overlay[data-type="returned"] .cardevent-btn  { background: #ff4d4d; color: #fff; }
.cardevent-overlay[data-type="gifted"] .cardevent-icon  { background: rgba(79,214,232,.15); color: var(--cyan); box-shadow: 0 0 0 1px rgba(79,214,232,.35); }
.cardevent-overlay[data-type="gifted"] .cardevent-title { color: var(--cyan); }
.cardevent-overlay[data-type="gifted"] .cardevent-card  { box-shadow: 0 0 30px -6px rgba(79,214,232,.35); border-color: rgba(79,214,232,.35); }
.cardevent-overlay[data-type="gifted"] .cardevent-btn   { background: var(--cyan); }
.cardevent-overlay[data-type="added"]  .cardevent-icon  { background: rgba(192,77,255,.15); color: var(--violet2); box-shadow: 0 0 0 1px rgba(192,77,255,.35); }
.cardevent-overlay[data-type="added"]  .cardevent-title { color: var(--violet2); }
.cardevent-overlay[data-type="added"]  .cardevent-card  { box-shadow: 0 0 30px -6px rgba(192,77,255,.45); border-color: rgba(192,77,255,.4); }
.cardevent-overlay[data-type="added"]  .cardevent-btn   { background: var(--grad-brand); color: #fff; }

.cardevent-gift-people {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 14px; font-size: 12px; color: var(--dim);
}
.cardevent-gift-people b { display: block; color: var(--text); font-size: 13px; }

/* ── 25. GAME MODAL ─────────────────────────────────────────── */
.gmodal {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: flex-end; justify-content: center;
}
.gmodal[hidden] { display: none; }
.gmodal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.gmodal-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, #0f1a30 0%, #11112a 100%);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(168,216,255,.15);
  padding: 28px 20px 44px;
  transform: translateY(100%);
  transition: transform .38s var(--spring);
}
/* Drag handle */
.gmodal-sheet::before {
  content: '';
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.2);
}
.gmodal.show .gmodal-sheet { transform: translateY(0); }
.gmodal-header {
  font-size: 17px; font-weight: 900; text-align: center;
  margin-bottom: 20px; letter-spacing: .4px; color: #fff;
}
.gmodal-body { min-height: 220px; display: flex; align-items: center; justify-content: center; }
.gmodal-result { padding: 10px 0 4px; text-align: center; }
.gmodal-closebtn { margin-top: 18px; width: 100%; }

/* Result */
.gres-win  { color: #fbbf24; }
.gres-lose { color: #888; }
.gres-icon  { font-size: 54px; margin-bottom: 8px; line-height: 1; }
.gres-title { font-size: 21px; font-weight: 900; margin-bottom: 4px; }
.gres-sub   { font-size: 12.5px; color: var(--dim); }
.gres-anim  { animation: gresPop .45s var(--bounce); }
@keyframes gresPop {
  from { transform: scale(.4) rotate(-8deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
.gres-win { animation: winterShimmer 2s ease-in-out infinite; }
@keyframes winterShimmer {
  0%,100% { text-shadow: 0 0 8px rgba(251,191,36,.5); }
  50%      { text-shadow: 0 0 20px rgba(168,216,255,.8), 0 0 40px rgba(251,191,36,.4); }
}

/* ── 26. WHEEL GAME ─────────────────────────────────────────── */
.wheel-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; width: 100%;
}
.wheel-pointer {
  font-size: 26px; line-height: 1;
  filter: drop-shadow(0 0 8px gold);
  animation: pointerBob .6s ease-in-out infinite alternate;
}
@keyframes pointerBob {
  from { transform: translateY(0); }
  to   { transform: translateY(4px); }
}
#wheelCanvas {
  border-radius: 50%;
  box-shadow:
    0 0 36px rgba(120,70,255,.55),
    0 0 0 4px rgba(255,255,255,.06),
    0 0 60px rgba(100,160,255,.1);
  transition: transform .3s;
}
#wheelCanvas.spinning { animation: wheelGlow 1s linear infinite alternate; }
@keyframes wheelGlow {
  from { box-shadow: 0 0 36px rgba(120,70,255,.55), 0 0 0 4px rgba(255,255,255,.06); }
  to   { box-shadow: 0 0 60px rgba(192,77,255,.9),  0 0 0 4px rgba(255,255,255,.15), 0 0 100px rgba(192,77,255,.3); }
}
.wheel-hint { font-size: 11.5px; color: var(--dim); letter-spacing: .3px; }

/* ── 27. JACKPOT / SLOT ─────────────────────────────────────── */
.slot-machine { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.slot-title   { font-size: 13px; font-weight: 700; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; }
.slot-reels   { display: flex; gap: 10px; }
.slot-reel {
  width: 84px; height: 94px;
  background: #0b0b1e;
  border: 2px solid rgba(168,216,255,.25);
  border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 16px rgba(0,0,0,.6), 0 0 8px rgba(168,216,255,.08);
}
.slot-sym { font-size: 46px; text-align: center; line-height: 1; display: block; }
.slot-sym.spinning { animation: symSpin .12s ease-in-out infinite alternate; }
.slot-sym.stop     { animation: symStop .4s var(--bounce); }
@keyframes symSpin {
  from { transform: scale(.88) translateY(-6px) rotateX(-20deg); }
  to   { transform: scale(1.08) translateY(6px) rotateX(20deg); }
}
@keyframes symStop {
  from { transform: scale(1.6) translateY(-24px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.slot-lights { display: flex; gap: 6px; justify-content: center; }
.slot-light {
  width: 8px; height: 8px; border-radius: 50%; background: #fbbf24;
  animation: lightBlink .5s infinite alternate;
}
.slot-light:nth-child(even) { animation-delay: .25s; background: #f472b6; }
@keyframes lightBlink {
  from { opacity: .3; transform: scale(.8); }
  to   { opacity: 1;  transform: scale(1.2); }
}
.jackpot-flash { animation: jFlash .6s ease-in-out 3; }
@keyframes jFlash {
  0%,100% { background: #0f1a30; }
  50%      { background: #2a0e5a; box-shadow: inset 0 0 80px rgba(192,77,255,.4); }
}

/* ── 28. MINI GAME ──────────────────────────────────────────── */
.mini-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.mini-arena {
  position: relative; width: 100%; height: 234px;
  background: radial-gradient(ellipse at center, #1a1050 0%, #08081c 100%);
  border-radius: 18px; overflow: hidden; cursor: crosshair;
  border: 1px solid #2a2a50;
}
.mini-target {
  position: absolute; font-size: 50px; cursor: pointer;
  user-select: none; -webkit-user-select: none;
  filter: drop-shadow(0 0 14px gold);
  transition: transform .08s; will-change: left, top;
  animation: targetPop .2s var(--bounce);
}
@keyframes targetPop {
  from { transform: scale(0) rotate(-20deg); }
  to   { transform: scale(1) rotate(0deg); }
}
.mini-target:active { transform: scale(.55) !important; }
.mini-timer-bar {
  position: absolute; bottom: 0; left: 0; height: 4px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width .1s linear; border-radius: 0 2px 0 0;
}
.mini-countdown {
  position: absolute; top: 8px; right: 12px;
  font-size: 24px; font-weight: 900; color: #fff;
  text-shadow: 0 0 8px rgba(0,0,0,.8);
}
.mini-score {
  position: absolute; top: 8px; left: 12px;
  font-size: 14px; font-weight: 700; color: #fbbf24;
}
.mini-hint { font-size: 12px; color: var(--dim); text-align: center; }

/* ── 29. CHEST GAME ─────────────────────────────────────────── */
.chest-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.chest-emoji {
  font-size: 88px; cursor: pointer; display: block; text-align: center;
  filter: drop-shadow(0 0 20px rgba(255,180,0,.4));
  transition: transform .08s; will-change: transform;
  animation: chestBreath 2.5s ease-in-out infinite;
}
@keyframes chestBreath {
  0%,100% { transform: scale(1);    filter: drop-shadow(0 0 20px rgba(255,180,0,.4)); }
  50%      { transform: scale(1.05); filter: drop-shadow(0 0 36px rgba(255,200,87,.7)); }
}
.chest-emoji:active { transform: scale(.88) !important; animation: none; }
.chest-emoji.shake {
  animation: chestShake .5s ease-in-out;
}
.chest-emoji.open {
  animation: chestOpen .6s var(--spring) forwards;
}
@keyframes chestShake {
  0%,100% { transform: rotate(0) scale(1); }
  20%      { transform: rotate(-12deg) scale(1.1); }
  40%      { transform: rotate(12deg) scale(1.18); }
  60%      { transform: rotate(-8deg) scale(1.12); }
  80%      { transform: rotate(8deg) scale(1.08); }
}
@keyframes chestOpen {
  0%   { transform: scale(1);   filter: drop-shadow(0 0 20px rgba(255,180,0,.4)); }
  40%  { transform: scale(1.6); filter: brightness(3) drop-shadow(0 0 60px gold); }
  100% { transform: scale(0);   opacity: 0; filter: brightness(6); }
}
.chest-hint { font-size: 13px; color: var(--dim); text-align: center; }
.chest-particles { position: relative; height: 56px; pointer-events: none; }
.particle {
  position: absolute; font-size: 22px; left: 50%; top: 50%;
  animation: pFly .9s ease-out forwards;
}
@keyframes pFly {
  from { transform: translate(0,0) scale(1); opacity: 1; }
  to   { transform: translate(var(--tx),var(--ty)) scale(.3); opacity: 0; }
}

/* ── 30. MEMORY MATCH ───────────────────────────────────────── */
.memory-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.memory-info {
  display: flex; justify-content: space-between; width: 100%;
  font-size: 11.5px; color: var(--dim); padding: 0 2px;
}
.memory-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; width: 100%; }
.mem-card {
  aspect-ratio: 1; border-radius: 10px; cursor: pointer;
  perspective: 500px; position: relative;
}
.mem-inner {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d;
  transition: transform .38s var(--spring);
  border-radius: 10px;
}
.mem-card.mem-flip .mem-inner    { transform: rotateY(180deg); }
.mem-card.mem-matched .mem-inner { transform: rotateY(180deg); }
.mem-card.mem-matched { opacity: .65; }
.mem-front, .mem-back {
  position: absolute; inset: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; backface-visibility: hidden;
}
.mem-front {
  background: #1e1e42; border: 1.5px solid #3a3a60;
  color: #888; font-weight: 900; font-size: 18px;
}
.mem-back {
  background: linear-gradient(135deg, #2d1b69, #1a1050);
  border: 1.5px solid #5b39cc;
  transform: rotateY(180deg);
}
.mem-card.mem-matched .mem-back {
  background: linear-gradient(135deg, #064e3b, #065f46);
  border-color: #10b981;
  animation: matchGlow .5s var(--bounce);
}
@keyframes matchGlow {
  0%  { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
  50% { box-shadow: 0 0 20px 6px rgba(16,185,129,.5); }
  100%{ box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ── 31. NUMBER GUESS ───────────────────────────────────────── */
.guess-wrap   { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; text-align: center; }
.guess-title  { font-size: 13.5px; font-weight: 700; color: #fff; }
.guess-tries-left { font-size: 12px; color: var(--dim); }
.guess-hint   { font-size: 13px; min-height: 20px; font-weight: 600; transition: color .3s; }
.guess-input-row { display: flex; gap: 8px; width: 100%; }
.guess-input {
  flex: 1; border-radius: 10px; border: 1.5px solid #3a3a60;
  background: #0d0d1e; color: #fff; padding: 10px 14px; font-size: 16px;
  -moz-appearance: textfield;
  transition: border-color .2s, box-shadow .2s;
}
.guess-input:focus { outline: none; border-color: var(--violet2); box-shadow: 0 0 0 3px rgba(192,77,255,.2); }
.guess-input::-webkit-inner-spin-button, .guess-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.guess-history { display: flex; flex-direction: column; gap: 5px; width: 100%; max-height: 120px; overflow-y: auto; }
.guess-hist-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  background: #1a1a38; border-radius: 8px; font-size: 12px;
  animation: histRowIn .2s var(--spring);
}
@keyframes histRowIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}
.guess-hist-row b     { font-size: 14px; min-width: 28px; text-align: center; }
.guess-hist-row small { color: var(--dim); flex: 1; text-align: left; }

/* ── 32. REFLEX TAP ─────────────────────────────────────────── */
.reflex-wrap        { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.reflex-instruction { font-size: 16px; font-weight: 800; color: #fff; text-align: center; transition: color .3s; }
.reflex-arena {
  width: 100%; height: 220px;
  background: radial-gradient(ellipse at center, #11102e 0%, #06060f 100%);
  border-radius: 18px; border: 1.5px solid #2a2a50;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.reflex-arena.ready {
  border-color: rgba(255,200,87,.6);
  box-shadow: 0 0 30px rgba(255,200,87,.2);
  animation: arenaPulse .5s ease-in-out infinite alternate;
}
@keyframes arenaPulse {
  from { box-shadow: 0 0 20px rgba(255,200,87,.15); }
  to   { box-shadow: 0 0 50px rgba(255,200,87,.4); }
}
.reflex-target {
  font-size: 60px;
  transition: font-size .2s var(--bounce), filter .2s;
  user-select: none; -webkit-user-select: none;
  animation: reflexPop .25s var(--bounce);
}
@keyframes reflexPop {
  from { transform: scale(0) rotate(-30deg); }
  to   { transform: scale(1) rotate(0deg); }
}
.reflex-hint { font-size: 11.5px; color: var(--dim); text-align: center; }

/* ── 33. WINTER / SEASONAL ──────────────────────────────────── */
.winter-banner {
  margin: 0 0 14px; border-radius: 18px; overflow: hidden;
  background: var(--winter-grad);
  border: 1px solid rgba(168,216,255,.25);
  box-shadow: 0 0 24px rgba(100,160,255,.12);
  position: relative;
}
.wb-snow {
  text-align: center; font-size: 10px; letter-spacing: 6px;
  padding: 6px 0 0; opacity: .5;
  animation: snowDrift 4s ease-in-out infinite alternate;
}
@keyframes snowDrift {
  from { letter-spacing: 4px; opacity: .4; }
  to   { letter-spacing: 10px; opacity: .7; }
}
.wb-body { display: flex; align-items: center; gap: 10px; padding: 10px 14px 14px; }
.wb-icon { font-size: 36px; filter: drop-shadow(0 0 8px rgba(168,216,255,.6)); }
.wb-body div { flex: 1; }
.wb-body b    { display: block; font-size: 13px; color: var(--ice); font-weight: 800; }
.wb-body small{ display: block; font-size: 10px; color: rgba(168,216,255,.6); margin-top: 2px; }
.wb-badge {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff; font-size: 9px; font-weight: 900;
  padding: 3px 7px; border-radius: 6px; letter-spacing: .5px; white-space: nowrap;
}

/* Ice confetti */
.cardevent-confetti.winter span {
  background: none !important; font-size: 14px;
  animation: iceFall var(--dur,2s) ease-in var(--delay,0s) 1 forwards !important;
  width: auto !important; height: auto !important; opacity: 0;
}
@keyframes iceFall {
  0%   { transform: translateY(-20px) rotate(0deg) scale(1); opacity: 1; }
  80%  { opacity: .8; }
  100% { transform: translateY(110vh) rotate(720deg) scale(.6); opacity: 0; }
}

/* Rarity winter card glow */
.cardevent-card.rarity-galaxy { box-shadow: 0 0 30px rgba(120,80,255,.8), 0 0 60px rgba(168,216,255,.3) !important; }
.cardevent-card.rarity-legend { box-shadow: 0 0 24px rgba(251,191,36,.7), 0 0 40px rgba(168,216,255,.2) !important; }
.cardevent-card.rarity-unique {
  box-shadow: 0 0 36px rgba(240,80,200,.9), 0 0 70px rgba(168,216,255,.4) !important;
  animation: uniquePulse 1.2s ease-in-out infinite alternate;
}
@keyframes uniquePulse {
  from { box-shadow: 0 0 36px rgba(240,80,200,.7); }
  to   { box-shadow: 0 0 60px rgba(240,80,200,1), 0 0 100px rgba(168,216,255,.5); }
}

/* ── 34. RESPONSIVE (desktop preview) ───────────────────────── */
@media (min-width: 481px) {
  body { background-color: #050310; }
  .app {
    margin-top: 24px; border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
    min-height: 860px;
  }
  .bottomnav { border-radius: 0 0 32px 32px; }
}

/* ── 35. REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── 36. HINT (small grey text) ─────────────────────────────── */
.hint { font-size: 9.5px; color: var(--dim); margin-top: 8px; display: block; }

/* ═══ ADMIN PANEL ══════════════════════════════════════════ */
.admin-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 16px;
}
.astat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 8px; text-align: center;
  transition: transform .2s var(--bounce);
}
.astat:hover { transform: translateY(-3px); }
.astat span  { font-size: 20px; display: block; margin-bottom: 6px; }
.astat b     { display: block; font-size: 16px; margin-bottom: 2px; }
.astat small { font-size: 9px; color: var(--dim); }

.admin-section-title {
  font-size: 13px; color: var(--dim); margin: 12px 0 8px;
  font-weight: 700; letter-spacing: .06em;
}
.admin-tx-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 11px; margin-bottom: 6px;
  animation: listRowIn .3s var(--spring) both;
}
.atx-type  { flex:1; color: var(--dim); }
.atx-curr  { font-size: 9px; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px; }
.atx-amt   { font-weight: 800; min-width: 60px; text-align: right; }
.atx-time  { color: var(--dim); font-size: 9px; }

/* Admin user rows */
.admin-user-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
  animation: listRowIn .3s var(--spring) both;
}
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-info b { display: block; font-size: 12.5px; }
.admin-user-info small { display: block; font-size: 9.5px; color: var(--dim); }
.admin-user-actions { display: flex; gap: 6px; }

/* Admin card rows */
.admin-card-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
  animation: listRowIn .3s var(--spring) both;
}
.admin-card-thumb {
  width: 44px; height: 44px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.admin-card-actions { display: flex; gap: 6px; }

/* Admin buttons */
.admin-btn {
  border: none; border-radius: 8px; padding: 6px 10px;
  font-size: 10.5px; font-weight: 800; cursor: pointer;
  transition: transform .15s var(--bounce), opacity .2s;
}
.admin-btn:active { transform: scale(.9); }
.admin-btn:hover  { opacity: .85; }
.admin-btn.red    { background: rgba(255,92,146,.2); color: var(--rose); border: 1px solid rgba(255,92,146,.3); }
.admin-btn.green  { background: rgba(62,224,138,.2); color: var(--green); border: 1px solid rgba(62,224,138,.3); }
.admin-btn.blue   { background: rgba(79,214,232,.2); color: var(--cyan); border: 1px solid rgba(79,214,232,.3); }
.admin-btn.gold   { background: rgba(255,200,87,.2); color: var(--gold); border: 1px solid rgba(255,200,87,.3); }

.admin-search-row { display: flex; gap: 8px; margin-bottom: 8px; }

/* ═══ CARD MODAL ════════════════════════════════════════════ */
.cardmodal-sheet {
  width: 100%; max-width: 430px; position: relative;
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--border); border-radius: 24px 24px 0 0;
  padding: 0 0 30px;
  animation: cardevent-pop .35s var(--spring);
  max-height: 90dvh; overflow-y: auto;
}
.cardmodal-art {
  width: 100%; aspect-ratio: 16/9; border-radius: 22px 22px 0 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; overflow: hidden;
}
.cardmodal-name  { font-size: 18px; margin: 14px 18px 2px; }
.cardmodal-anime { font-size: 11px; color: var(--dim); margin: 0 18px; display: block; }
.cardmodal-rarity{ font-size: 11px; font-weight: 800; margin: 4px 18px 10px; display: block; }
.cardmodal-row   {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 18px; border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.cardmodal-row span { color: var(--dim); }
.cardmodal-row b { font-weight: 800; }
.cardmodal-actions { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px 0; }
.cardmodal-actions .cta { width: 100%; }
.cardmodal-close {
  position: absolute; top: 12px; right: 14px;
  background: rgba(0,0,0,.4); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
}
.cardmodal-close:hover { background: rgba(255,92,146,.4); }

/* ═══ MARKET IMPROVEMENTS ══════════════════════════════════ */
.listrow-thumb {
  width: 48px; height: 48px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; overflow: hidden; background: var(--surface2);
}
.listrow-info  { flex: 1; min-width: 0; }
.listrow-info b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listrow-info small { font-size: 9.5px; color: var(--dim); display: block; }
.listrow-price { color: var(--gold); font-weight: 800; font-size: 11px; white-space: nowrap; }
.listrow-actbtn { white-space: nowrap; }

/* ═══ PROFILE IMPROVEMENTS ═════════════════════════════════ */
.profilecard { position: relative; }
.profilecard .avatar.big { position: relative; }

/* ═══ TOAST TYPES ═══════════════════════════════════════════ */
.toast-success { border-color: rgba(62,224,138,.4); background: rgba(10,30,20,.95); }
.toast-error   { border-color: rgba(255,92,146,.4); background: rgba(30,10,20,.95); }
.toast-info    { border-color: var(--border); }

/* ═══ CARD MODAL BACKDROP ═══════════════════════════════════ */
#cardModal { cursor: pointer; }
#cardModal .cardmodal-sheet { cursor: auto; }

/* ═══ AI PREVIEW IMAGE ══════════════════════════════════════ */
#aiPreview img {
  animation: cardEntrance .4s var(--spring);
  box-shadow: 0 8px 32px rgba(139,61,255,.4);
}

/* ═══ STAT BADGES ═══════════════════════════════════════════ */
.rank-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.15);
}

/* ═══════════════════════════════════════════════════════════
   V5 — REYTING, YUTUQLAR, REFERRAL, ZAR DUEL
═══════════════════════════════════════════════════════════ */

/* ── Home: reyting "men" qatori va achievements teaser ──────── */
.ranklist li.me { color: var(--violet2); font-weight: 800; }
.ranklist li.me b { color: var(--violet2); }

.achteaser { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px; margin-bottom: 14px; transition: border-color .2s, transform .2s var(--bounce); }
.achteaser:active { transform: scale(.98); }
.achteaser.has-claim { border-color: rgba(255,200,87,.5); box-shadow: 0 0 0 1px rgba(255,200,87,.15); }
.achteaser.has-claim .panelhead::after { content: '🎁'; margin-left: 4px; animation: heroFloat 1.4s ease-in-out infinite; }

/* ── Leaderboard view ────────────────────────────────────────── */
.lb-myrank { text-align: center; }
.lb-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.lb-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 9px 12px;
  animation: listRowIn .3s var(--spring) both;
  transition: transform .2s var(--bounce), border-color .2s;
}
.lb-row:active { transform: scale(.98); }
.lb-row.me { border-color: rgba(192,77,255,.5); background: rgba(139,61,255,.08); }
.lb-row.top3 { border-color: rgba(255,200,87,.35); }
.lb-rank { width: 30px; text-align: center; font-size: 15px; font-weight: 800; color: var(--dim); flex: none; }
.lb-row.top3 .lb-rank { font-size: 19px; }
.lb-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--grad-brand); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; overflow: hidden;
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; font-weight: 700; overflow: hidden; }
.lb-name small { color: var(--dim); font-weight: 500; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-value { color: var(--gold); font-size: 12.5px; flex: none; }
.skeleton-lbrow {
  height: 52px; border-radius: 13px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 300% 100%; animation: shimmer 1.6s ease-in-out infinite;
}

/* ── Achievements view ───────────────────────────────────────── */
.ach-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.ach-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px;
  animation: listRowIn .3s var(--spring) both;
  transition: transform .2s var(--bounce), border-color .2s, box-shadow .2s;
}
.ach-card.locked { opacity: .55; }
.ach-card.ready { border-color: rgba(255,200,87,.5); box-shadow: 0 0 20px -8px rgba(255,200,87,.4); cursor: pointer; }
.ach-card.ready:active { transform: scale(.97); }
.ach-card.claimed { border-color: rgba(62,224,138,.35); }
.ach-icon { font-size: 28px; flex: none; width: 44px; text-align: center; }
.ach-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ach-body b { font-size: 13px; }
.ach-body small { color: var(--dim); font-size: 10.5px; }
.ach-body .progressline { margin: 4px 0 2px; }
.ach-progress { color: var(--gold) !important; font-weight: 700; }
.ach-state { font-size: 20px; flex: none; }
.ach-card.ready .ach-state { animation: heroFloat 1.2s ease-in-out infinite; }

/* ── Achievement unlock overlay ─────────────────────────────── */
.achunlock-sheet { padding-top: 32px; }
.achunlock-icon {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-size: 34px;
  background: radial-gradient(circle, rgba(255,200,87,.25), rgba(255,200,87,.05));
  box-shadow: 0 0 0 1px rgba(255,200,87,.4), 0 0 40px -6px rgba(255,200,87,.5);
  animation: achPulse 1.6s ease-in-out infinite;
}
@keyframes achPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.achunlock-name { display: block; font-size: 17px; color: var(--gold); margin-bottom: 4px; }
.achunlock-reward {
  font-size: 15px; font-weight: 800; color: var(--green);
  margin-bottom: 18px; letter-spacing: .02em;
}

/* ── Referral panel (Profile) ───────────────────────────────── */
.refpanel { position: relative; overflow: hidden; }
.refcode-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px dashed var(--border);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 10px;
}
.refcode {
  flex: 1; font-family: 'Baloo 2', monospace; font-size: 16px; font-weight: 800;
  letter-spacing: .12em; color: var(--violet2);
}
.refcopybtn {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  width: 34px; height: 34px; border-radius: 10px; font-size: 14px; flex: none;
  transition: transform .15s var(--bounce), background .2s;
}
.refcopybtn:active { transform: scale(.9); background: var(--grad-brand); }
.refstats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.refstats div {
  text-align: center; background: rgba(255,255,255,.03);
  border-radius: 10px; padding: 8px;
}
.refstats b { display: block; font-size: 17px; color: var(--gold); }
.refstats small { color: var(--dim); font-size: 9.5px; }

/* ── Zar Duel game ───────────────────────────────────────────── */
.duel-hint { text-align: center; color: var(--dim); font-size: 11.5px; margin-bottom: 16px; }
.duel-arena { display: flex; align-items: center; justify-content: center; gap: 18px; }
.duel-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.duel-side small { color: var(--dim); font-size: 11px; font-weight: 700; }
.duel-die {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(160deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: var(--text);
  transition: border-color .3s, box-shadow .3s;
}
.duel-die.rolling { animation: duelRoll .16s linear infinite; }
@keyframes duelRoll {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(12deg) scale(1.06); }
  100% { transform: rotate(-10deg) scale(1); }
}
.duel-die.duel-win {
  border-color: var(--gold); color: var(--gold);
  box-shadow: 0 0 24px -4px rgba(255,200,87,.6);
  animation: gresPop .4s var(--bounce);
}
.duel-vs { font-family: 'Baloo 2'; font-size: 13px; color: var(--dim); font-weight: 800; }

/* ── Game result: push (durrang) state ──────────────────────── */
.gres-push { color: var(--cyan); }

/* ── Number count-up micro-interaction (balance changes) ─────── */
.pill, .statbox b, .lb-value {
  transition: transform .25s var(--bounce);
}
.pulse-update { animation: pulseUpdate .5s var(--bounce); }
@keyframes pulseUpdate {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   V6 — STREAK, FUSION
═══════════════════════════════════════════════════════════ */

/* ── Daily streak badge (quickrow) ──────────────────────────── */
.qbtn { position: relative; }
.streakbadge {
  position: absolute; top: -4px; right: 2px;
  background: linear-gradient(135deg,#ff9f4a,#ff5c92);
  color: #fff; font-size: 8.5px; font-weight: 900;
  padding: 2px 5px; border-radius: 99px;
  box-shadow: 0 2px 8px rgba(255,92,74,.4);
  animation: streakPop .4s var(--bounce);
}
@keyframes streakPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ── Fusion entry teaser (Cards view) ───────────────────────── */
.fusionentry { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px; transition: border-color .2s, transform .2s var(--bounce); }
.fusionentry:active { transform: scale(.98); }

/* ── Fusion list ─────────────────────────────────────────────── */
.fusion-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.fusion-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px;
  animation: listRowIn .3s var(--spring) both;
}
.fusion-thumb {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: var(--surface2); display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.fusion-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fusion-info b { font-size: 12.5px; }
.fusion-info small { font-size: 10px; color: var(--dim); }
.fusion-btn {
  flex: none; width: 44px; height: 44px; padding: 0 !important;
  font-size: 18px; border-radius: 12px;
  background: linear-gradient(135deg,#7a2bf5,#c04dff);
}

/* ── cardevent 'fused' accent ────────────────────────────────── */
.cardevent-overlay[data-type="fused"] .cardevent-icon { background: rgba(255,155,224,.15); color: #ff9be0; box-shadow: 0 0 0 1px rgba(255,155,224,.4); }
.cardevent-overlay[data-type="fused"] .cardevent-title { color: #ff9be0; }
.cardevent-overlay[data-type="fused"] .cardevent-card  { box-shadow: 0 0 34px -6px rgba(255,155,224,.5); border-color: rgba(255,155,224,.4); }
.cardevent-overlay[data-type="fused"] .cardevent-btn   { background: linear-gradient(135deg,#7a2bf5,#ff9be0); color: #fff; }
