@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg: #080208;
  --bg2: #0d0510;
  --red: #c41e3a;
  --red-glow: rgba(196,30,58,0.4);
  --gold: #d4af37;
  --gold-glow: rgba(212,175,55,0.3);
  --purple: #2d1b4e;
  --deep-purple: #1a0f2e;
  --text: #e8e0d4;
  --dim: #7a6f63;
  --card: #120a1e;
  --border: #2a1a3e;
  --flame: #ff4500;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}

h1, h2, h3 { font-family: 'Cinzel', serif; }

/* ─── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: linear-gradient(180deg, rgba(8,2,8,0.98) 0%, rgba(13,5,16,0.95) 100%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.nav-brand {
  font-family: 'Cinzel', serif; font-size: 22px; font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--dim); text-decoration: none; font-size: 14px;
  transition: color .3s; letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
}
.nav-links a:hover { color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); }
.btn-connect {
  padding: 10px 24px; background: linear-gradient(135deg, var(--red), #8b0000);
  color: #fff; border: none; border-radius: 6px; cursor: pointer;
  font-weight: 700; font-size: 13px; letter-spacing: 1px;
  transition: all .3s; box-shadow: 0 0 15px var(--red-glow);
}
.btn-connect:hover { transform: scale(1.05); box-shadow: 0 0 25px var(--red-glow); }

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  display: flex; align-items: center; justify-content: center;
  padding: 0; min-height: 100vh; text-align: center;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(196,30,58,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 20%, rgba(212,175,55,0.05) 0%, transparent 40%);
  position: relative; overflow: hidden;
}
.hero-bg-effects { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.smoke {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196,30,58,0.06) 0%, transparent 70%);
  animation: smokeDrift 12s ease-in-out infinite;
}
.smoke-1 { bottom: -200px; left: -100px; animation-delay: 0s; }
.smoke-2 { bottom: -200px; right: -100px; animation-delay: 6s; }
@keyframes smokeDrift {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
  50% { transform: translateY(-100px) scale(1.3); opacity: 0.8; }
}
.ember {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--flame); animation: emberRise 4s ease-out infinite;
}
.ember-1 { bottom: 10%; left: 20%; animation-delay: 0s; }
.ember-2 { bottom: 5%; left: 60%; animation-delay: 1.5s; }
.ember-3 { bottom: 15%; left: 80%; animation-delay: 3s; }
@keyframes emberRise {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-300px) scale(0); }
}

.hero-center { position: relative; z-index: 1; }
.hero-chip-showcase {
  position: relative; width: 200px; height: 200px; margin: 0 auto 32px;
}
.hero-chip-img {
  width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated;
  animation: heroChipFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 40px var(--gold-glow));
}
@keyframes heroChipFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}
.hero-chip-glow {
  position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.2) 0%, transparent 70%);
  animation: heroGlow 3s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  from { opacity: 0.5; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.1); }
}

.hero h1 {
  font-size: 72px; line-height: 0.9; margin-bottom: 16px;
  background: linear-gradient(180deg, #fff 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.tagline { font-size: 18px; color: var(--dim); margin-bottom: 36px; line-height: 1.8; }
.hero-cta { display: flex; gap: 16px; justify-content: center; margin-bottom: 40px; }
.btn-ghost {
  display: inline-block; padding: 16px 36px;
  background: transparent; border: 1px solid var(--border);
  color: var(--dim); border-radius: 6px; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: all .3s;
  letter-spacing: 1px; text-transform: uppercase; font-family: 'Rajdhani', sans-serif;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 20px var(--gold-glow); }

.hero-stats-bar { display: flex; gap: 12px; justify-content: center; }
.stat-pill {
  padding: 8px 18px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 13px; color: var(--dim);
}
.stat-pill .stat-num { color: var(--gold); font-weight: 700; margin-right: 4px; }
.stat-pill.fire .stat-num { color: var(--flame); }
.stat-pill.fire { border-color: rgba(255,69,0,0.3); }

.btn-primary {
  display: inline-block; padding: 16px 36px;
  background: linear-gradient(135deg, var(--red), #8b0000);
  color: #fff; border: none; border-radius: 6px; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: all .3s;
  box-shadow: 0 4px 20px var(--red-glow); letter-spacing: 1px;
  text-transform: uppercase; font-family: 'Rajdhani', sans-serif;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px var(--red-glow); }

/* ─── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: 100px 60px; position: relative; }
.section.dark {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}
.section h2 {
  font-size: 42px; margin-bottom: 50px; text-align: center;
  background: linear-gradient(180deg, var(--text) 0%, var(--dim) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── Section Headers ──────────────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 50px; }
.section-sub { color: var(--dim); font-size: 16px; margin-top: 8px; }

/* ─── Steps → Rules Grid ──────────────────────────────────────────────────── */
.rules-grid { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.rule-item {
  display: flex; align-items: flex-start; gap: 24px; padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.rule-item:last-child { border-bottom: none; }
.rule-num {
  font-family: 'Cinzel', serif; font-size: 36px; font-weight: 900;
  color: var(--red); opacity: 0.4; min-width: 60px;
}
.rule-content h4 { font-size: 18px; color: var(--gold); margin-bottom: 6px; font-family: 'Cinzel', serif; }
.rule-content p { color: var(--dim); font-size: 14px; line-height: 1.7; }

/* ─── Mint ─────────────────────────────────────────────────────────────────── */
.mint-box {
  max-width: 520px; margin: 0 auto;
  background: linear-gradient(135deg, var(--card) 0%, var(--deep-purple) 100%);
  padding: 48px; border-radius: 20px;
  border: 1px solid var(--border); text-align: center;
  box-shadow: 0 0 60px rgba(196,30,58,0.1), inset 0 0 60px rgba(0,0,0,0.3);
}
.mint-divider { height: 1px; background: var(--border); margin: 24px 0; }
.mint-price { color: var(--dim); font-size: 14px; margin-bottom: 16px; }
.mint-controls { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.qty-selector { display: flex; align-items: center; gap: 14px; }
.qty-selector button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--gold); font-size: 20px; cursor: pointer; transition: all .2s;
}
.qty-selector button:hover { border-color: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
.qty-selector span { font-size: 24px; font-weight: 700; min-width: 30px; text-align: center; color: var(--gold); }
.btn-mint {
  padding: 16px 40px; background: linear-gradient(135deg, var(--red), #8b0000);
  color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 700;
  cursor: pointer; box-shadow: 0 0 20px var(--red-glow); transition: all .3s;
  letter-spacing: 1px; text-transform: uppercase;
}
.btn-mint:hover { transform: scale(1.05); box-shadow: 0 0 30px var(--red-glow); }
.mint-tiers { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.tier { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.common { background: #8B7355; box-shadow: 0 0 6px rgba(139,115,85,0.5); }
.dot.rare { background: #4a90d9; box-shadow: 0 0 6px rgba(74,144,217,0.5); }
.dot.epic { background: #9b59b6; box-shadow: 0 0 6px rgba(155,89,182,0.5); }
.dot.legendary { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }

/* ─── Games ────────────────────────────────────────────────────────────────── */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.game-card {
  background: linear-gradient(160deg, var(--card) 0%, rgba(45,27,78,0.2) 100%);
  padding: 36px; border-radius: 16px;
  border: 1px solid var(--border); text-align: center;
  transition: all .4s; position: relative; overflow: hidden;
}
.game-card::before {
  content: ''; position: absolute; inset: -2px;
  background: linear-gradient(135deg, var(--red), var(--gold), var(--red));
  border-radius: 18px; opacity: 0; transition: opacity .4s; z-index: -1;
  pointer-events: none;
}
.game-card:hover::before { opacity: 0.3; }
.game-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.game-icon { font-size: 52px; margin-bottom: 16px; }
.game-card h3 { color: var(--gold); margin-bottom: 10px; font-size: 22px; }
.game-card p { color: var(--dim); font-size: 13px; margin-bottom: 12px; line-height: 1.6; }
.game-badge {
  position: absolute; top: 16px; right: 16px;
  padding: 4px 10px; border-radius: 12px; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  background: rgba(212,175,55,0.1); color: var(--gold); border: 1px solid rgba(212,175,55,0.3);
}
.game-meta {
  display: flex; justify-content: center; gap: 16px; margin-bottom: 4px; font-size: 12px;
}
.game-stake { color: var(--dim); }
.game-reward { color: #00e676; font-weight: 700; }
.game-cost { color: var(--red); font-weight: 700; font-size: 12px; letter-spacing: 1px; }
.btn-game {
  margin-top: 16px; padding: 12px 22px; background: transparent;
  border: 1px solid var(--red); color: var(--red); border-radius: 6px;
  cursor: pointer; font-size: 13px; font-weight: 700; transition: all .3s;
  position: relative; z-index: 2; letter-spacing: 1px; text-transform: uppercase;
}
.btn-game:hover { background: var(--red); color: #fff; box-shadow: 0 0 20px var(--red-glow); }

/* ─── Modal ────────────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: linear-gradient(135deg, var(--card), var(--deep-purple));
  padding: 44px; border-radius: 20px;
  text-align: center; max-width: 420px;
  border: 1px solid var(--border); box-shadow: 0 0 60px rgba(196,30,58,0.2);
}
.modal-icon { font-size: 64px; margin-bottom: 16px; }
.modal-content h3 { margin-bottom: 10px; font-size: 26px; }
.modal-content p { color: var(--dim); margin-bottom: 28px; }

/* ─── Profile ──────────────────────────────────────────────────────────────── */
.profile-grid { max-width: 800px; margin: 0 auto; }
.profile-balance {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--card), var(--deep-purple));
  padding: 28px; border-radius: 16px; margin-bottom: 28px;
  border: 1px solid var(--border);
}
.balance-left { display: flex; flex-direction: column; }
.balance-label { color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.balance-value { font-size: 36px; font-weight: 700; color: var(--gold); font-family: 'Cinzel', serif; }
.balance-right { display: flex; align-items: center; gap: 16px; }
.withdraw-info { display: flex; flex-direction: column; align-items: flex-end; }
.withdraw-label { font-size: 11px; color: var(--dim); }
.withdraw-value { font-size: 18px; font-weight: 700; color: #00e676; }
.profile-nfts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ─── Leaderboard ──────────────────────────────────────────────────────────── */
.leaderboard-table { max-width: 600px; margin: 0 auto; }
.lb-header, .lb-row {
  display: grid; grid-template-columns: 40px 1fr 100px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.lb-header { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.lb-row span:last-child { color: var(--gold); font-weight: 700; }
.lb-row:hover { background: rgba(212,175,55,0.03); }

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  padding: 28px 60px; border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, rgba(8,2,8,1) 100%);
}
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--dim); text-decoration: none; font-size: 13px; transition: color .3s; }
.footer-links a:hover { color: var(--gold); }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 60px 20px; text-align: center; }
  .hero h1 { font-size: 48px; }
  .steps, .games-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 20px; }
  .nav { padding: 12px 16px; }
  .nav-links { display: none; }
  .profile-nfts { grid-template-columns: repeat(2, 1fr); }
}

/* ─── NFT Selection Grid ─────────────────────────────────────────────────── */
.nft-select-area { margin-bottom: 32px; }
.nft-select-grid { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.nft-select-item {
  width: 180px; cursor: pointer; border-radius: 12px;
  border: 2px solid var(--border); padding: 10px; text-align: center;
  transition: all .3s; background: var(--card);
}
.nft-select-item:hover { border-color: var(--gold); transform: scale(1.05); box-shadow: 0 0 20px var(--gold-glow); }
.nft-select-item.selected { border-color: var(--red); box-shadow: 0 0 25px var(--red-glow); }
.nft-select-item img { width: 100%; border-radius: 8px; image-rendering: pixelated; }
.nft-select-item .nft-label { font-size: 10px; color: var(--dim); margin-top: 4px; }
.nft-select-item .nft-tier { font-size: 11px; font-weight: 700; }
.nft-tier-common { color: #8B7355; }
.nft-tier-rare { color: #4a90d9; }
.nft-tier-epic { color: #9b59b6; }
.nft-tier-legendary { color: var(--gold); }

/* ─── Nav Balance ─────────────────────────────────────────────────────────── */
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-balance {
  background: var(--card); padding: 6px 14px; border-radius: 20px;
  font-size: 13px; border: 1px solid var(--border); display: flex; align-items: center; gap: 6px;
}
.nav-balance .balance-chip { font-size: 14px; }
.nav-balance span:last-of-type { color: var(--gold); font-weight: 700; }

/* ─── Hero Buttons ─────────────────────────────────────────────────────────── */
.hero-buttons { display: flex; gap: 20px; align-items: center; justify-content: center; }

/* ─── Flip Animation ─────────────────────────────────────────────────────── */
.flip-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.flip-container { text-align: center; }
.flip-stage { text-align: center; margin-bottom: 32px; }
.flip-chip {
  width: 180px; height: 180px; object-fit: contain;
  filter: drop-shadow(0 0 30px var(--red-glow));
  image-rendering: pixelated;
}
.flip-chip.spinning {
  animation: chipSpin 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes chipSpin {
  0% { transform: rotateY(0deg) scale(1); }
  25% { transform: rotateY(450deg) scale(0.7); }
  50% { transform: rotateY(900deg) scale(1.2); }
  75% { transform: rotateY(1350deg) scale(0.8); }
  100% { transform: rotateY(1800deg) scale(1); }
}

.flip-transition { position: relative; width: 180px; height: 180px; margin: 0 auto 24px; }
.flip-chip-old, .flip-chip-new {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; image-rendering: pixelated;
}

.flip-chip-old.win-out { animation: flashOut 0.6s forwards; }
@keyframes flashOut {
  0% { opacity: 1; transform: scale(1); filter: brightness(1); }
  50% { opacity: 1; transform: scale(1.3); filter: brightness(3) drop-shadow(0 0 40px var(--gold)); }
  100% { opacity: 0; transform: scale(0.5); }
}
.flip-chip-new.win-in { opacity: 0; animation: popIn 0.5s 0.6s forwards; }
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.3) rotate(-20deg); }
  60% { opacity: 1; transform: scale(1.2) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.flip-chip-old.burn-out { animation: burnAway 0.8s forwards; }
@keyframes burnAway {
  0% { opacity: 1; transform: scale(1); filter: brightness(1); }
  30% { transform: scale(1.1); filter: brightness(1.5) sepia(1) saturate(3) hue-rotate(-10deg); }
  60% { transform: scale(0.9) translateY(10px); filter: brightness(2) sepia(1) saturate(5); }
  100% { opacity: 0; transform: scale(0.3) translateY(40px); filter: brightness(3) blur(4px); }
}
.flip-chip-new.burn-in { opacity: 0; animation: riseIn 0.5s 0.8s forwards; }
@keyframes riseIn {
  0% { opacity: 0; transform: scale(0.5) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.flip-chip-old.dead-burn { animation: deadBurn 1.2s forwards; }
@keyframes deadBurn {
  0% { opacity: 1; transform: scale(1) rotate(0deg); filter: brightness(1); }
  20% { transform: scale(1.1) rotate(-3deg); filter: brightness(1.5) sepia(1); }
  50% { transform: scale(0.8) rotate(5deg); filter: brightness(2) sepia(1) saturate(5) hue-rotate(-20deg); }
  80% { transform: scale(0.4) rotate(-10deg) translateY(30px); filter: brightness(3) blur(2px); opacity: 0.5; }
  100% { transform: scale(0) rotate(20deg) translateY(60px); filter: blur(8px); opacity: 0; }
}

.flip-result { animation: slideUp 0.5s ease-out; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.flip-result h3 { font-size: 28px; margin-bottom: 8px; }
.flip-result p { color: var(--dim); margin-bottom: 24px; font-size: 16px; }
.flip-result.win h3 { color: #00e676; text-shadow: 0 0 20px rgba(0,230,118,0.6), 0 0 40px rgba(0,230,118,0.3); }
.flip-result.lose h3 { color: var(--red); text-shadow: 0 0 20px var(--red-glow); }
.flip-result.burn h3 { color: var(--flame); text-shadow: 0 0 20px rgba(255,69,0,0.6), 0 0 40px rgba(255,0,0,0.3); }

/* Glow on new chip */
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 20px var(--glow-color)) drop-shadow(0 0 40px var(--glow-color)); }
  50% { filter: drop-shadow(0 0 35px var(--glow-color)) drop-shadow(0 0 60px var(--glow-color)); }
}
.flip-chip-new.glow-common { --glow-color: rgba(139,115,85,0.5); animation: glowPulse 2s infinite !important; opacity: 1 !important; }
.flip-chip-new.glow-rare { --glow-color: rgba(74,144,217,0.6); animation: glowPulse 2s infinite !important; opacity: 1 !important; }
.flip-chip-new.glow-epic { --glow-color: rgba(155,89,182,0.7); animation: glowPulse 2s infinite !important; opacity: 1 !important; }
.flip-chip-new.glow-legendary { --glow-color: rgba(212,175,55,0.8); animation: glowPulse 1.5s infinite !important; opacity: 1 !important; }

/* ─── Fire Particles ───────────────────────────────────────────────────────── */
.burn-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 50%; }
.burn-particles .particle { position: absolute; width: 8px; height: 8px; border-radius: 50%; bottom: 30%; left: 50%; opacity: 0; }
.burn-particles.active .particle { animation: fireParticle var(--duration, 1s) var(--delay, 0s) ease-out forwards; }
@keyframes fireParticle {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  50% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--tx, 0px), var(--ty, -80px)) scale(0); }
}
.fire-glow {
  position: absolute; inset: -20px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,100,0,0.6) 0%, rgba(255,0,0,0.3) 40%, transparent 70%);
  opacity: 0; animation: fireGlow 1s ease-in forwards;
}
@keyframes fireGlow {
  0% { opacity: 0; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.2); }
  70% { opacity: 0.8; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ─── Duel Overlay ────────────────────────────────────────────────────────── */
.duel-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; animation: fadeIn 0.3s;
}
.duel-container { text-align: center; max-width: 700px; width: 100%; padding: 20px; }

.duel-arena { display: flex; align-items: center; justify-content: center; gap: 40px; margin-bottom: 32px; padding: 20px 0; }
.duel-player { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.duel-chip-img { width: 120px; height: 120px; object-fit: contain; image-rendering: pixelated; border-radius: 50%; }
.duel-left .duel-chip-img { filter: drop-shadow(0 0 15px rgba(0,230,118,0.5)); }
.duel-right .duel-chip-img { filter: drop-shadow(0 0 15px var(--red-glow)); }
.duel-label { font-size: 13px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 2px; }
.duel-tier { font-size: 12px; color: var(--gold); }
.duel-center { font-size: 36px; }
.duel-vs-text { font-size: 36px; animation: pulse 1s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.15); } }

.duel-choice h3 { font-size: 24px; color: var(--gold); margin-bottom: 4px; }
.duel-choice-btns { display: flex; gap: 20px; justify-content: center; }
.duel-pick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 44px; background: var(--card); border: 2px solid var(--border);
  border-radius: 16px; cursor: pointer; transition: all .3s; color: var(--text);
}
.duel-pick:hover { border-color: var(--red); transform: scale(1.05); box-shadow: 0 0 30px var(--red-glow); }
.duel-pick .pick-icon { font-size: 44px; }
.duel-pick span:nth-child(2) { font-size: 16px; font-weight: 700; }
.duel-pick .pick-sub { font-size: 11px; color: var(--dim); }

.spinning-slow { animation: chipSpinSlow 0.5s linear infinite; }
.spinning-slow-reverse { animation: chipSpinSlowReverse 0.5s linear infinite; }
@keyframes chipSpinSlow { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
@keyframes chipSpinSlowReverse { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(-360deg); } }

/* Duel result text */
.duel-result-text { animation: slideUp 0.5s ease-out; margin-top: 16px; }
.duel-result-text h3 { font-size: 22px; margin-bottom: 8px; }
.duel-result-text p { color: var(--dim); font-size: 15px; }
.duel-result-text.win h3 { color: #00e676; text-shadow: 0 0 20px rgba(0,230,118,0.6); }
.duel-result-text.lose h3 { color: var(--red); text-shadow: 0 0 20px var(--red-glow); }
.duel-result-text.burn h3 { color: var(--flame); text-shadow: 0 0 20px rgba(255,69,0,0.6); }

/* Inline duel animations */
.dead-burn-inline { animation: deadBurn 1.2s forwards; }
.burn-out-inline { animation: burnAway 0.8s forwards; }
.rise-in-place { animation: riseInPlace 0.5s ease-out forwards; }
@keyframes riseInPlace { 0% { opacity: 0; transform: scale(0.5) translateY(15px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.pop-in-place { animation: popInPlace 0.4s ease-out forwards; }
@keyframes popInPlace { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.loser-dim { transition: all 0.5s ease; filter: grayscale(0.7) brightness(0.5) !important; opacity: 0.6; }
.pulse-text h3 { animation: pulseTextGlow 1.5s ease-in-out infinite alternate; }
@keyframes pulseTextGlow { from { opacity: 0.8; } to { opacity: 1; } }

.duel-chip-img.glow-common { filter: drop-shadow(0 0 20px rgba(139,115,85,0.6)) drop-shadow(0 0 40px rgba(139,115,85,0.3)) !important; }
.duel-chip-img.glow-rare { filter: drop-shadow(0 0 20px rgba(74,144,217,0.7)) drop-shadow(0 0 40px rgba(74,144,217,0.4)) !important; }
.duel-chip-img.glow-epic { filter: drop-shadow(0 0 20px rgba(155,89,182,0.7)) drop-shadow(0 0 40px rgba(155,89,182,0.4)) !important; }
.duel-chip-img.glow-legendary { filter: drop-shadow(0 0 25px rgba(212,175,55,0.8)) drop-shadow(0 0 50px rgba(212,175,55,0.5)) !important; }

/* ─── Spin Overlay ─────────────────────────────────────────────────────────── */
.spin-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; animation: fadeIn 0.3s;
}
.spin-container { text-align: center; max-width: 600px; width: 100%; padding: 20px; }
.spin-title { font-size: 24px; color: var(--gold); margin-bottom: 24px; }
.spin-wheel-wrap { position: relative; width: 360px; height: 360px; margin: 0 auto 24px; }
.spin-arrow {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 32px; color: var(--red); z-index: 10;
  filter: drop-shadow(0 0 10px var(--red-glow));
  transform-origin: 50% 190px;
}
.spin-circle { position: relative; width: 100%; height: 100%; border: 2px dashed var(--border); border-radius: 50%; }
.spin-player { position: absolute; width: 90px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: all 0.5s ease; }
.spin-chip-img { width: 70px; height: 70px; object-fit: contain; image-rendering: pixelated; border-radius: 50%; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); transition: all 0.5s ease; }
.spin-wallet { font-size: 9px; color: var(--dim); white-space: nowrap; font-family: monospace; }
.spin-wallet-you { color: var(--gold); font-weight: 700; font-size: 11px; }
.spin-tier { font-size: 10px; color: var(--dim); }
.spin-winner .spin-chip-img { filter: drop-shadow(0 0 30px rgba(0,230,118,0.8)) drop-shadow(0 0 60px rgba(0,230,118,0.4)) !important; transform: scale(1.2); }
.spin-winner .spin-wallet { color: #00e676; font-size: 12px; }
.spin-loser { opacity: 0.6; }
.spin-loser .spin-wallet { color: var(--red); }
.spin-result-text { animation: slideUp 0.5s ease-out; margin-top: 16px; }
.spin-result-text h3 { font-size: 20px; margin-bottom: 8px; }
.spin-result-text p { color: var(--dim); font-size: 14px; }
.spin-result-text.win h3 { color: #00e676; text-shadow: 0 0 20px rgba(0,230,118,0.6); }
.spin-result-text.lose h3 { color: var(--red); text-shadow: 0 0 20px var(--red-glow); }
.spin-result-text.burn h3 { color: var(--flame); text-shadow: 0 0 20px rgba(255,69,0,0.6); }
.spin-chip-img.glow-common { filter: drop-shadow(0 0 15px rgba(139,115,85,0.6)) !important; }
.spin-chip-img.glow-rare { filter: drop-shadow(0 0 15px rgba(74,144,217,0.7)) !important; }
.spin-chip-img.glow-epic { filter: drop-shadow(0 0 15px rgba(155,89,182,0.7)) !important; }
.spin-chip-img.glow-legendary { filter: drop-shadow(0 0 20px rgba(212,175,55,0.8)) !important; }

/* ─── Withdraw UI ──────────────────────────────────────────────────────────── */
.btn-withdraw {
  padding: 10px 20px; background: linear-gradient(135deg, #00e676, #00c853);
  color: #000; border: none; border-radius: 6px; font-weight: 700;
  font-size: 13px; cursor: pointer; transition: all .3s;
}
.btn-withdraw:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(0,230,118,0.4); }
.withdraw-modal { max-width: 420px; }
.withdraw-modal h3 { font-size: 22px; margin-bottom: 8px; }
.withdraw-note { color: var(--dim); font-size: 13px; margin-bottom: 16px; }
.withdraw-stats { margin-bottom: 16px; }
.ws-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--dim); }
.ws-row span:last-child { color: var(--text); font-weight: 600; }
.withdraw-input-wrap { display: flex; gap: 8px; margin-bottom: 16px; }
.withdraw-input { flex: 1; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 16px; outline: none; }
.withdraw-input:focus { border-color: var(--gold); }
.btn-max { padding: 12px 16px; background: var(--border); border: none; border-radius: 8px; color: var(--gold); font-weight: 700; cursor: pointer; font-size: 12px; }
.btn-max:hover { background: var(--gold); color: #000; }
.withdraw-preview { display: flex; justify-content: space-between; padding: 12px 16px; background: rgba(0,230,118,0.05); border: 1px solid rgba(0,230,118,0.2); border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.withdraw-preview strong { color: #00e676; }
.burn-fee strong { color: var(--flame); }
.withdraw-btns { display: flex; gap: 12px; }
.btn-cancel { padding: 14px 24px; background: transparent; border: 1px solid var(--border); color: var(--dim); border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-cancel:hover { border-color: var(--red); color: var(--red); }

/* ─── Game Buttons Row ─────────────────────────────────────────────────────── */
.game-btns-row { display: flex; gap: 8px; margin-top: 16px; justify-content: center; }
.btn-game-pvp { border-color: #00e676; color: #00e676; }
.btn-game-pvp:hover { background: #00e676; color: #000; box-shadow: 0 0 20px rgba(0,230,118,0.4); }

/* ─── NFT Card ─────────────────────────────────────────────────────────────── */
.nft-card {
  background: var(--card); border-radius: 12px; padding: 8px;
  border: 1px solid var(--border); transition: all .3s;
}
.nft-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }

/* ─── Live Feed ────────────────────────────────────────────────────────────── */
.live-feed {
  position: fixed; bottom: 20px; right: 20px; z-index: 90;
  width: 300px; max-height: 320px;
  background: rgba(8,2,8,0.92); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.live-feed-header {
  padding: 10px 14px; font-size: 11px; font-weight: 700;
  color: var(--dim); text-transform: uppercase; letter-spacing: 2px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #00e676;
  animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #00e676; }
  50% { opacity: 0.4; box-shadow: 0 0 8px #00e676; }
}
.live-feed-list {
  padding: 8px; max-height: 270px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.live-feed-list::-webkit-scrollbar { width: 4px; }
.live-feed-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.live-item {
  padding: 8px 10px; border-radius: 8px; font-size: 12px;
  background: rgba(255,255,255,0.02); animation: liveSlideIn 0.3s ease-out;
  line-height: 1.4;
}
@keyframes liveSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.live-item .live-wallet { color: var(--gold); font-weight: 600; }
.live-item .live-action { color: var(--dim); }
.live-item.live-win { border-left: 2px solid #00e676; }
.live-item.live-lose { border-left: 2px solid var(--red); }
.live-item.live-burn { border-left: 2px solid var(--flame); }
.live-item.live-upgrade { border-left: 2px solid var(--gold); }

@media (max-width: 768px) {
  .live-feed { width: 240px; bottom: 10px; right: 10px; max-height: 200px; }
}

/* ─── Mint Progress ────────────────────────────────────────────────────────── */
.mint-progress { margin-bottom: 24px; }
.mint-progress-bar {
  width: 100%; height: 8px; background: var(--bg);
  border-radius: 4px; overflow: hidden; border: 1px solid var(--border);
}
.mint-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 4px; transition: width 0.5s ease;
}
.mint-progress-text {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 12px; color: var(--dim);
}
.mint-progress-text strong { color: var(--gold); }
