/* ═══════════════════════════════════════
   REVERSE — Premium Dark Gaming Design System
═══════════════════════════════════════ */
:root {
  --bg:          #07070B;
  --bg-app:      #0B0B12;
  --bg-card:     #14141E;
  --bg-hover:    #222233;
  --accent:      #A78BFA;
  --accent-soft: rgba(167,139,250,0.18);
  --accent-dim:  rgba(167,139,250,0.08);
  --text:        #F4F2FF;
  --text-sub:    #9B95B5;
  --border:      rgba(167,139,250,0.14);
  --shadow:      0 12px 36px rgba(0,0,0,0.55);
  --glow:        0 0 28px rgba(124,58,237,0.4);
  --radius-card: 22px;
  --radius-pill: 40px;
  --radius-chip: 14px;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;border:none;outline:none}
*:focus-visible{outline:2px solid #E9A23B;outline-offset:2px}
html,body{height:100%;width:100%;background:var(--bg);color:var(--text);
  font-family:'Outfit',system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.5;overflow:hidden;}

/* ── LOADER ─────────────────────────── */
#loader{position:fixed;inset:0;z-index:999;background:var(--bg);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}
.loader-spinner{width:44px;height:44px;border:3px solid var(--bg-hover);
  border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;box-shadow:var(--glow)}
.loader-text{color:var(--text-sub);font-size:13px;letter-spacing:.05em;text-transform:uppercase;font-weight:700}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── TOAST ──────────────────────────── */
#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%) translateY(10px);
  background:var(--bg-card);color:var(--text);padding:12px 24px;border-radius:var(--radius-pill);
  font-size:13px;font-weight:700;box-shadow:var(--shadow),0 0 0 1px var(--border);
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;z-index:800;white-space:nowrap;
  text-transform:uppercase;letter-spacing:1px}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ── APP LAYOUT ─────────────────────── */
#app-container { 
  max-width: 480px; 
  margin: 0 auto; 
  background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.16) 0%, transparent 45%), 
              radial-gradient(circle at bottom left, rgba(232, 121, 249, 0.1) 0%, transparent 50%), 
              var(--bg-app);
  min-height: 100vh; 
  position: relative; 
  overflow: hidden; 
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}
#app { display:flex;flex-direction:column;height:100vh;width:100% }

/* ── HEADER ─────────────────────────── */
.app-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px 12px; flex-shrink:0; z-index:10;
  background:linear-gradient(180deg, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0.6) 100%);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(255,255,255,0.04);
  box-shadow:0 1px 0 rgba(255,75,75,0.04), 0 4px 20px rgba(0,0,0,0.3);
  position:relative;
}
.app-header::after {
  content:''; position:absolute; bottom:0; left:20px; right:20px; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,75,75,0.25) 30%, rgba(255,75,75,0.25) 70%, transparent);
  pointer-events:none;
}
.header-brand {
  font-size:21px; font-weight:900; letter-spacing:.14em;
  color:var(--text); text-transform:uppercase; font-style:italic;
  background:linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
  text-shadow:none;
  filter:drop-shadow(0 0 12px rgba(255,75,75,0.2));
}
.header-badges { display:flex; gap:8px; }
.badge {
  background:rgba(255,255,255,0.04);
  border-radius:var(--radius-chip);
  padding:6px 13px; font-size:12px; font-weight:800; color:var(--text-sub);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(0,0,0,0.3);
  border:1px solid rgba(255,255,255,0.07);
  transition:background .2s, color .2s;
  backdrop-filter:blur(10px);
}
.badge.badge-accent {
  background:linear-gradient(135deg, rgba(255,75,75,0.2) 0%, rgba(255,75,75,0.08) 100%);
  color:var(--accent); border-color:rgba(255,75,75,0.3);
  box-shadow:0 0 12px rgba(255,75,75,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ── MAIN SCROLL ────────────────────── */
.app-main{flex:1;overflow-y:auto;overflow-x:hidden;padding:0 20px;scroll-behavior:smooth}
.app-main::-webkit-scrollbar{display:none;}

/* ── TABS ───────────────────────────── */
.tab{display:none;flex-direction:column;gap:20px;animation:fadein .3s ease}
.tab.active{display:flex}
.tab::after { content: ''; display: block; height: 140px; flex-shrink: 0; }
@keyframes fadein{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ── BENTO CARDS ────────────────────── */
.bento-card{background:var(--bg-card);border-radius:var(--radius-card);padding:24px;
  box-shadow:var(--shadow);border:1px solid var(--border);position:relative;overflow:hidden;}
.bento-row{display:flex;gap:12px}
.bento-row .bento-card{flex:1}
.mini-stat{padding:18px;text-align:center}

/* ── SECTION HEADING ────────────────── */
.section-heading{font-size:13px;font-weight:900;color:var(--text);
  text-transform:uppercase;letter-spacing:.12em;margin-top:-2px;margin-bottom:8px;display:flex;align-items:center;gap:8px}
.section-heading::before{content:'';display:block;width:4px;height:14px;background:var(--accent);border-radius:2px;box-shadow:var(--glow)}

/* ── PROFILE ────────────────────────── */
.profile-card {
  display:flex; align-items:center; gap:18px;
  background:
    radial-gradient(circle at 0% 50%, rgba(255,75,75,0.1) 0%, transparent 50%),
    linear-gradient(135deg, rgba(28,28,32,0.98) 0%, rgba(20,20,24,0.95) 100%);
  border:1px solid rgba(255,75,75,0.1);
  position:relative; overflow:hidden;
}
.profile-card::before {
  content:''; position:absolute; top:0; left:0; bottom:0; width:3px;
  background:linear-gradient(180deg, var(--accent) 0%, rgba(255,75,75,0.2) 100%);
  border-radius:0 2px 2px 0;
}
.profile-avatar-wrap { position:relative; flex-shrink:0; }
.profile-avatar {
  width:80px; height:80px; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #2a2a30 0%, #141416 100%);
  display:flex; align-items:center; justify-content:center; font-size:34px;
  color:var(--accent); overflow:hidden;
  box-shadow:
    0 0 0 2px rgba(255,75,75,0.35),
    0 0 0 4px rgba(255,75,75,0.08),
    0 8px 24px rgba(0,0,0,0.5),
    0 0 20px rgba(255,75,75,0.2);
  border:2px solid var(--bg-card);
  transition:box-shadow .3s;
}
.profile-avatar:hover {
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 0 5px rgba(255,75,75,0.15),
    0 8px 32px rgba(0,0,0,0.6),
    0 0 32px rgba(255,75,75,0.35);
}
.profile-info { flex:1; min-width:0; }
.profile-name {
  font-size:22px; font-weight:900;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  letter-spacing:0.3px; line-height:1.2;
  background:linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
}
.profile-sub {
  font-size:12px; color:var(--text-sub); margin-top:5px;
  font-weight:600; letter-spacing:0.3px;
  display:flex; align-items:center; gap:5px;
}
.league-chip {
  display:inline-flex; align-items:center; gap:5px;
  margin-top:9px;
  background:linear-gradient(135deg, rgba(255,75,75,0.18) 0%, rgba(255,75,75,0.06) 100%);
  color:var(--accent); font-size:11px; font-weight:900;
  padding:5px 14px; border-radius:var(--radius-chip);
  border:1px solid rgba(255,75,75,0.3);
  box-shadow:0 0 10px rgba(255,75,75,0.1), inset 0 1px 0 rgba(255,255,255,0.06);
  letter-spacing:0.8px; text-transform:uppercase;
}

/* ── STATS BENTO ────────────────────── */
.stats-bento { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.stat-tile {
  background:linear-gradient(145deg, rgba(22,22,26,0.98) 0%, rgba(18,18,22,0.96) 100%);
  border-radius:18px; padding:16px 10px; text-align:center; cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,0.4); border:1px solid rgba(255,255,255,0.05);
  transition:transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .2s;
  position:relative; overflow:hidden;
}
.stat-tile::before {
  content:''; position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:0; height:2px; background:var(--accent); border-radius:0 0 2px 2px;
  transition:width .3s ease; box-shadow:0 0 8px rgba(255,75,75,0.6);
}
.stat-tile:hover::before { width:40%; }
.stat-tile:hover {
  transform:translateY(-3px);
  box-shadow:0 8px 24px rgba(0,0,0,0.5);
  border-color:rgba(255,255,255,0.09);
}
.stat-tile:active { transform:scale(0.94); }
.accent-tile {
  background:linear-gradient(145deg, rgba(255,75,75,0.14) 0%, rgba(255,75,75,0.04) 100%);
  border-color:rgba(255,75,75,0.25);
  box-shadow:0 4px 16px rgba(255,75,75,0.08);
}
.accent-tile::before { width:30% !important; }
.accent-tile::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg, rgba(255,75,75,0.05) 0%, transparent 60%);
  pointer-events:none;
}
.stat-label {
  font-size:10px; color:var(--text-sub); font-weight:800;
  text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px;
}
.stat-value { font-size:22px; font-weight:900; letter-spacing:-0.5px; line-height:1.1; }
.accent-text { color:var(--accent); text-shadow:0 0 10px rgba(255,75,75,0.35); }

/* ── RECENT CARDS ───────────────────── */
.recent-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.recent-item { display: flex; align-items: center; gap: 14px; background: var(--bg-card); padding: 14px 16px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); cursor: pointer; transition: all .2s; }
.recent-item:active { transform: scale(0.97); }
.recent-icon-wrap { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--bg-hover); flex-shrink: 0; display:flex; align-items:center; justify-content:center; }
.recent-icon { width: 100%; height: 100%; object-fit: cover; }
.recent-info { flex: 1; min-width: 0; }
.recent-name { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.recent-rank { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.recent-pts { font-size: 15px; font-weight: 900; color: #4ade80; text-shadow: 0 0 10px rgba(74,222,128,0.3); }

/* ── ACTION PILLS ───────────────────── */
.action-row{display:flex;gap:12px}
.action-pill{flex:1;padding:16px;background:var(--bg-card);
  border-radius:var(--radius-pill);color:var(--text);font-family:inherit;
  font-size:14px;font-weight:800;cursor:pointer;transition:all .2s;text-align:center;
  box-shadow:var(--shadow);border:1px solid var(--border);text-transform:uppercase;letter-spacing:1px}
.action-pill:active{transform:scale(.95)}
.accent-btn{background:linear-gradient(135deg,#ff5757 0%,#ff3434 100%);color:#fff;box-shadow:0 12px 34px rgba(255,75,75,.34);border:none;}
.accent-btn:hover{filter:brightness(1.1)}
.full-pill{width:100%;flex:unset;display:block}

/* ── FILTER PILLS ───────────────────── */
.filter-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:8px;scrollbar-width:none}
.filter-row::-webkit-scrollbar{display:none}
.filter-pill{flex-shrink:0;padding:8px 18px;background:var(--bg-card);
  border-radius:var(--radius-pill);color:var(--text-sub);font-family:inherit;
  font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;transition:all .2s;
  box-shadow:var(--shadow);border:1px solid var(--border)}
.filter-pill.active{background:var(--accent-dim);color:var(--accent);border-color:var(--accent);box-shadow:var(--glow)}

/* ── CARDS GRID ─────────────────────── */
.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:16px;width:100%;align-items:start;}
.card-item{background:var(--bg-card);border-radius:20px;overflow:hidden;cursor:pointer;
  box-shadow:var(--shadow);border:1px solid var(--border);transition:all .2s;display:flex;flex-direction:column;width:100%;position:relative}
.card-item:active{transform:scale(.95)}
.card-img-wrap{width:100%;aspect-ratio:3/4;background:var(--bg-hover);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;position:relative}
.card-img-wrap::after{content:'';position:absolute;inset:0;background:linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);}
.card-img-wrap img, .card-img-wrap video{width:100%;height:100%;object-fit:cover;display:block}
.card-img-placeholder{font-size:40px;color:var(--text-sub);z-index:2}
.card-rank-bar{height:4px;width:100%;flex-shrink:0;position:relative;z-index:2}
.card-info{padding:14px;display:flex;flex-direction:column;gap:6px;position:absolute;bottom:0;left:0;right:0;z-index:2;}
.card-item .font-black{font-size:15px;font-weight:900;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,0.8);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.card-item .text-\[9px\]{font-size:10px;font-weight:800;letter-spacing:1px;text-shadow:0 1px 2px rgba(0,0,0,0.8);}
.card-item .flex.gap-1{display:flex;gap:6px;}
.card-item .flex.gap-1 span{background:rgba(0,0,0,0.6) !important;backdrop-filter:blur(4px);border:1px solid rgba(255,255,255,0.1) !important;border-radius:8px;padding:4px 8px !important;color:#fff !important;font-size:11px;}

/* Rarity colors — anime card identity */
.bg-Обычный{background:#94A3B8;box-shadow:0 0 8px #94A3B8}
.bg-Редкий{background:#38BDF8;box-shadow:0 0 10px #38BDF8}
.bg-Эпический{background:#C084FC;box-shadow:0 0 10px #C084FC}
.bg-Легендарный{background:#FBBF24;box-shadow:0 0 12px #FBBF24}
.bg-Мифический{background:linear-gradient(90deg,#FB7185,#E879F9);box-shadow:0 0 14px #FB7185}
.r-Обычный{color:#94A3B8}
.r-Редкий{color:#38BDF8}
.r-Эпический{color:#C084FC}
.r-Легендарный{color:#FBBF24}
.r-Мифический{color:#FB7185}

/* ── PAGINATION ─────────────────────── */
.pagination-row{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px 0 8px}
.page-btn{padding:12px 24px;background:var(--bg-card);
  border-radius:var(--radius-pill);color:var(--text);font-family:inherit;
  font-size:14px;font-weight:800;cursor:pointer;transition:all .2s;box-shadow:var(--shadow);border:1px solid var(--border)}
.page-btn:disabled{opacity:.3;cursor:not-allowed}
.page-btn:not(:disabled):active{transform:scale(0.9)}
.page-info{font-size:14px;color:var(--text-sub);font-weight:800;letter-spacing:2px}

/* ── EMPTY STATE ────────────────────── */
.empty-state{text-align:center;color:var(--text-sub);font-size:14px;padding:48px 20px;font-weight:700;text-transform:uppercase;letter-spacing:1px}

/* ── ARENA ──────────────────────────── */
.arena-stats-card{text-align:center;background:radial-gradient(circle at center, rgba(255,75,75,0.1) 0%, var(--bg-card) 70%);}
.arena-stat-row{display:flex;justify-content:space-around;align-items:center;margin-bottom:20px}
.arena-stat-val{font-size:32px;font-weight:900;letter-spacing:-1px}
.arena-stat-lbl{font-size:12px;color:var(--text-sub);font-weight:700;margin-top:4px;text-transform:uppercase;letter-spacing:1px}
.arena-divider{width:2px;height:48px;background:var(--border);border-radius:1px}
.arena-league{font-size:15px;color:var(--accent);font-weight:800;text-transform:uppercase;letter-spacing:2px}

/* ── LEADERBOARD ────────────────────── */
.leaderboard{display:flex;flex-direction:column;gap:10px}
.lb-row{display:flex;align-items:center;gap:16px;background:var(--bg-card);
  border-radius:20px;padding:16px 20px;box-shadow:var(--shadow);border:1px solid var(--border)}
.lb-rank{width:32px;font-size:20px;font-weight:900;text-align:center;flex-shrink:0;color:var(--text-sub)}
.lb-name{flex:1;font-weight:800;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-trophy{font-weight:900;color:var(--accent);font-size:15px;text-shadow:0 0 10px rgba(255,75,75,0.3)}

/* ── TEAM ───────────────────────────── */
.team-list{display:flex;flex-direction:column;gap:12px}
.team-slot{display:flex;align-items:center;gap:16px;background:var(--bg-card);
  border-radius:20px;padding:16px 20px;box-shadow:var(--shadow);border:1px solid var(--border)}
.slot-num{width:40px;height:40px;border-radius:50%;background:var(--bg-hover);
  color:var(--text-sub);font-weight:900;font-size:16px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid var(--border)}
.team-slot:has(.filled) .slot-num{background:var(--accent-dim);color:var(--accent);border-color:var(--accent-soft);box-shadow:var(--glow)}
.slot-info{flex:1;min-width:0}
.slot-name{font-size:15px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.slot-stats{font-size:12px;color:var(--text-sub);margin-top:4px;font-weight:600;letter-spacing:1px}
.slot-btn{width:40px;height:40px;border-radius:50%;font-family:inherit;
  font-size:20px;font-weight:300;cursor:pointer;background:var(--bg-hover);color:var(--text-sub);
  transition:all .2s;flex-shrink:0;box-shadow:var(--shadow);border:1px solid var(--border);display:flex;align-items:center;justify-content:center}
.slot-btn.filled{background:rgba(255,75,75,.15);color:var(--accent);border-color:rgba(255,75,75,.3)}

/* ── TASKS ──────────────────────────── */
.tasks-list{display:flex;flex-direction:column;gap:16px}
.task-item{background:var(--bg-card);border-radius:20px;
  padding:20px;box-shadow:var(--shadow);border:1px solid var(--border);position:relative;overflow:hidden}
.task-completed{opacity:0.6;background:var(--bg-hover)}
.task-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.task-title{font-size:15px;font-weight:900;letter-spacing:0.5px}
.task-period{font-size:10px;font-weight:800;letter-spacing:0.6px;text-transform:uppercase;padding:3px 8px;border-radius:999px;background:var(--bg-hover);color:var(--text-sub);flex-shrink:0}
.task-period-daily{color:#60a5fa;background:rgba(96,165,250,.12)}
.task-period-weekly{color:#fbbf24;background:rgba(251,191,36,.14)}
.task-period-regular{color:#a3a3a3;background:rgba(163,163,163,.12)}
.task-desc{font-size:13px;color:var(--text-sub);margin-bottom:8px;font-weight:500}
.task-expires{font-size:11px;color:var(--text-sub);opacity:.85;margin-bottom:10px;font-weight:600}
.task-spin-hint{margin-left:6px;font-size:10px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:#fbbf24}
.task-progress-text{font-size:12px;color:var(--accent);font-family:monospace;font-weight:700;
  letter-spacing:1px;margin-bottom:8px;text-align:right}
.task-progress{height:8px;background:var(--bg-hover);border-radius:99px;
  overflow:hidden;margin-bottom:16px;border:1px solid var(--border)}
.task-bar{height:100%;background:var(--accent);border-radius:99px;transition:width .4s;box-shadow:var(--glow);}
.task-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.task-reward{font-size:13px;color:var(--text);font-weight:800;background:var(--bg-hover);padding:6px 12px;border-radius:10px}
.task-claim{padding:10px 20px;background:var(--accent);color:#fff;
  border-radius:var(--radius-pill);font-family:inherit;font-size:13px;font-weight:800;cursor:pointer;box-shadow:var(--glow);border:none;letter-spacing:1px}
.task-done-badge{font-size:13px;color:#4ade80;font-weight:800;letter-spacing:1px}

/* ── CLAN (legacy helpers) ──────────── */
.clan-card{background:var(--bg-card);border-radius:24px;padding:24px;box-shadow:var(--shadow);border:1px solid var(--border);position:relative;overflow:hidden;}
.clan-name{font-size:24px;font-weight:900;margin-bottom:10px;letter-spacing:1px}
.section-title{font-size:14px;font-weight:900;color:var(--text);letter-spacing:2px;margin:24px 0 16px;text-align:center}
.title-bracket{color:var(--accent)}
.no-clan-box{text-align:center;padding:60px 20px;background:var(--bg-card);
  border-radius:24px;box-shadow:var(--shadow);border:1px solid var(--border)}
.no-clan-icon{font-size:64px;margin-bottom:20px;color:var(--text-sub);opacity:0.5}
.no-clan-title{font-size:22px;font-weight:900;margin-bottom:12px;letter-spacing:1px}
.no-clan-desc{font-size:14px;color:var(--text-sub);line-height:1.6;font-weight:500}

/* ── SHOP ───────────────────────────── */
.shop-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.shop-item{background:var(--bg-card);border-radius:20px;padding:24px 16px;text-align:center;cursor:pointer;position:relative;overflow:hidden;transition:all .2s;border:1px solid var(--border);box-shadow:var(--shadow)}
.shop-item:active{transform:scale(0.95)}
.shop-item.featured{border-color:var(--accent);box-shadow:var(--glow), var(--shadow);background:radial-gradient(circle at top, var(--accent-dim) 0%, var(--bg-card) 100%)}
.featured-badge{position:absolute;top:0;right:0;background:var(--accent);color:#fff;
  font-size:10px;font-weight:900;padding:6px 12px;border-radius:0 20px 0 16px;letter-spacing:1px;box-shadow:var(--glow)}
.shop-icon{font-size:36px;margin-bottom:12px;filter:drop-shadow(0 4px 8px rgba(0,0,0,0.5))}
.shop-name{font-size:15px;font-weight:800;margin-bottom:6px;letter-spacing:0.5px}
.shop-price{font-size:13px;color:var(--text-sub);font-weight:700}
.exchange-row{display:flex;align-items:center;justify-content:space-between;
  cursor:pointer;transition:all .2s;padding:20px 24px;font-size:15px;font-weight:800;letter-spacing:0.5px}
.exchange-row:active{transform:scale(0.98)}

/* ── MODAL ──────────────────────────── */
.modal-overlay{display:none;position:fixed;inset:0;z-index:2000;
  background:rgba(0,0,0,.85);backdrop-filter:blur(10px);
  align-items:center;justify-content:center;padding:20px;}
.modal-overlay.open{display:flex}
.modal-sheet{background:var(--bg-card);border-radius:32px;
  width:100%;max-width:400px;padding:32px 24px;position:relative;
  animation:popIn .4s cubic-bezier(.175,.885,.32,1.275);
  box-shadow:0 20px 60px rgba(0,0,0,.8), 0 0 0 1px var(--border)}
@keyframes popIn{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}
.modal-close-btn{position:absolute;top:20px;right:20px;
  width:40px;height:40px;border-radius:50%;background:var(--bg-hover);
  color:var(--text-sub);font-size:20px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:.2s;border:1px solid var(--border);z-index:10;}
.modal-close-btn:hover{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:var(--glow)}

/* ── BOTTOM NAV (clean, uniform) ─────────────────────── */
.bottom-nav {
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(12,12,14,0.85); backdrop-filter:blur(28px);
  -webkit-backdrop-filter:blur(28px);
  padding:6px 8px; position:fixed; bottom:14px; left:50%;
  transform:translateX(-50%);
  width:calc(100% - 20px); max-width:440px; z-index:100;
  border-radius:22px; border:1px solid rgba(255,255,255,0.06);
  box-shadow:0 16px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
  gap:2px;
}

.nav-btn {
  display:flex; align-items:center; justify-content:center;
  background:transparent; color:rgba(255,255,255,0.42);
  cursor:pointer; border:none;
  flex:1; min-width:0; height:42px; border-radius:14px;
  transition:color .2s, background .2s, transform .15s;
  position:relative;
  -webkit-tap-highlight-color:transparent;
}
.nav-btn:active { transform:scale(0.92); }
.nav-btn.active {
  color:var(--accent);
  background:rgba(255,75,75,0.1);
}
.nav-btn.active::after {
  content:''; position:absolute; top:-1px; left:50%;
  transform:translateX(-50%);
  width:18px; height:2px; border-radius:99px;
  background:var(--accent);
  box-shadow:0 0 8px rgba(255,75,75,.6);
}
.nav-ico { display:flex; align-items:center; justify-content:center; }
.nav-ico svg { width:22px; height:22px; }
.nav-lbl { display:none; }

/* Elevated center Arena button (no diamond) */
.center-btn {
  background:linear-gradient(135deg, #FF4B4B 0%, #D80027 100%) !important;
  color:#fff !important;
  width:52px !important; height:52px !important;
  flex:0 0 52px !important; border-radius:18px !important;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 22px rgba(255,75,75,.45),
             inset 0 1px 0 rgba(255,255,255,.25) !important;
  transform:translateY(-12px) !important;
  border:none !important; margin:0 4px !important; z-index:101;
  transition:transform .2s !important;
}
.center-btn .nav-ico { transform:none !important; }
.center-btn::after { display:none !important; }
.center-btn.active {
  transform:translateY(-14px) scale(1.04) !important;
  background:linear-gradient(135deg, #FF4B4B 0%, #D80027 100%) !important;
  color:#fff !important;
}
.center-btn:active { transform:translateY(-10px) scale(.94) !important; }

/* ── LOGIN ──────────────────────────── */
#login-screen{position:fixed;inset:0;z-index:3000;background:var(--bg-app);
  display:flex;align-items:center;justify-content:center;padding:24px}
.login-box{width:100%;max-width:380px;background:var(--bg-card);border-radius:32px;
  padding:40px 32px;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.8);border:1px solid var(--border)}
.login-title{font-size:36px;font-weight:900;color:var(--text);letter-spacing:4px;margin-bottom:8px;text-shadow:0 4px 20px rgba(255,255,255,0.1)}
.login-sub{font-size:13px;color:var(--text-sub);margin-bottom:40px;font-weight:700;text-transform:uppercase;letter-spacing:2px}
.login-input{width:100%;background:var(--bg-hover);border-radius:20px;
  padding:16px 20px;color:var(--text);font-family:inherit;font-size:16px;font-weight:700;
  transition:.2s;margin-bottom:16px;display:block;border:1px solid var(--border);text-align:center;letter-spacing:1px}
.login-input:focus{box-shadow:var(--glow);border-color:var(--accent)}
.login-btn{width:100%;padding:16px;border-radius:20px;font-family:inherit;
  font-size:14px;font-weight:800;cursor:pointer;transition:.2s;margin-bottom:12px;display:block;text-transform:uppercase;letter-spacing:1px}
.login-btn.primary{background:var(--accent);color:#fff;box-shadow:var(--glow);border:none}
.login-btn.primary:active{transform:scale(0.95)}
.login-btn.secondary{background:var(--bg-hover);color:var(--text);border:1px solid var(--border)}
.login-btn.secondary:active{transform:scale(0.95)}
.login-hint{font-size:12px;color:var(--text-sub);margin-top:24px;font-weight:500;line-height:1.6}
.shake{animation:shake .4s}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-10px)}75%{transform:translateX(10px)}}

/* Retro button classes from JS */
.retro-button{border:none;box-shadow:var(--glow);transition:transform 0.2s}
.retro-button:active{transform:scale(0.95)}
.retro-border-sm{border:1px solid rgba(255,255,255,0.1)}

/* MODAL */
.modal-overlay { display:none; position:fixed; inset:0; z-index:2000; background:rgba(0,0,0,0.88); backdrop-filter:blur(14px); justify-content:center; align-items:center; }
.modal-overlay.open { display:flex; }
.modal-sheet {
  background:linear-gradient(180deg, rgba(22,22,26,0.98) 0%, rgba(14,14,18,0.99) 100%);
  border-radius:36px; width:92%; max-width:380px;
  position:relative; overflow:hidden;
  border:1px solid rgba(255,255,255,0.07);
  box-shadow:0 32px 80px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04);
}
.modal-close-btn {
  position:absolute; top:18px; right:18px;
  width:38px; height:38px; border-radius:50%;
  background:rgba(255,255,255,0.07); color:var(--text-sub);
  border:1px solid rgba(255,255,255,0.1); cursor:pointer; z-index:10;
  font-size:16px; display:flex; align-items:center; justify-content:center;
  transition:.2s; backdrop-filter:blur(6px);
}
.modal-close-btn:hover { background:var(--accent); color:#fff; border-color:var(--accent); box-shadow:var(--glow); }
#card-reveal-inner {
  padding:0 0 24px;
  display:flex; flex-direction:column; align-items:center;
  text-align:center; position:relative;
}
.modal-card-img-wrap {
  width:100%; position:relative; overflow:hidden;
  border-radius:36px 36px 0 0;
  margin-bottom:20px;
}
.modal-card-img {
  width:100%; aspect-ratio:3/4; object-fit:cover;
  display:block;
}

/* ── Card reveal modal (menu visible behind) ───────── */
#card-modal.reveal-mode {
  background: rgba(0, 0, 0, 0.58) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px 14px max(18px, env(safe-area-inset-bottom)) !important;
  border-radius: 0 !important;
}
#card-modal.reveal-mode .reveal-sheet,
#card-modal.reveal-mode .modal-sheet.reveal-sheet {
  width: min(340px, 92vw) !important;
  max-width: min(340px, 92vw) !important;
  height: auto !important;
  max-height: calc(100dvh - 32px) !important;
  margin: 0 auto !important;
  border-radius: 22px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  background: rgba(14, 14, 18, 0.94) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.55) !important;
  overflow: visible !important;
  display: block !important;
  position: relative !important;
}
#card-modal.reveal-mode .modal-close-btn { display: none !important; }
#card-modal.reveal-mode #modal-content {
  display: block !important;
  width: 100% !important;
  border-radius: 0 !important;
}

.cr-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cr-card-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cr-card {
  width: min(100%, 300px);
  aspect-ratio: 3 / 4;
  height: auto;
  max-height: min(56dvh, calc(100dvh - 200px));
  max-width: min(300px, calc(min(56dvh, calc(100dvh - 200px)) * 0.75));
  position: relative;
  padding: 0;
  margin: 0 auto;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0e;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rank, #ff4d6a) 45%, #444), 0 14px 32px rgba(0,0,0,.45);
  cursor: default;
  transform: none;
  transform-origin: center center;
  transition: transform .38s cubic-bezier(.22,.7,.2,1);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  backface-visibility: hidden;
}
.cr-card.is-front { cursor: zoom-in; }
.cr-card.flipping { pointer-events: none; }
.cr-card.flip-out {
  transform: rotateY(90deg) scale(.985);
  transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.cr-card.flip-in {
  transform: rotateY(-90deg) scale(.985);
  transition: none;
}
.cr-card.is-front:not(.flip-in):not(.flip-out) {
  transform: none;
  transition: transform .62s cubic-bezier(.22,1,.36,1);
}
.cr-screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 12px 12px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(8px) scale(.985);
  transition: opacity .34s ease, transform .4s cubic-bezier(.22,1,.36,1);
}
.cr-screen.cr-in {
  opacity: 1;
  transform: none;
}

.cr-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cr-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}
.cr-overlay.show { opacity: 1; }

.cr-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 0;
}
.cr-name-pill {
  max-width: 78%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.12);
}
.cr-rank-badge {
  flex-shrink: 0;
  max-width: 42%;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--rank, #C084FC);
  background: rgba(0,0,0,.78);
  border: 1px solid color-mix(in srgb, var(--rank, #C084FC) 55%, transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-rank-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--rank, #C084FC);
  background: rgba(0,0,0,.75);
  border: 1px solid color-mix(in srgb, var(--rank, #C084FC) 55%, transparent);
  flex-shrink: 0;
}

.cr-bottom {
  margin: 0 8px 8px;
  padding: 6px 9px 7px;
  border-radius: 10px;
  background: rgba(0,0,0,.8);
  border: 1px solid rgba(255,255,255,.1);
  transform: translateY(12px);
  opacity: 0;
  transition: transform .42s cubic-bezier(.22,1,.36,1), opacity .36s ease;
  /* не заезжать на арт: компактнее + чуть ниже */
  max-height: 22%;
}
.cr-overlay.show .cr-bottom {
  transform: none;
  opacity: 1;
}
.cr-type {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,200,160,.75);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-statline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.cr-statline span {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
}
.cr-statline i {
  font-style: normal;
  font-size: 10px;
  opacity: .85;
  color: #ff6b7a;
}

.cr-dock {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  position: relative;
  z-index: 5;
}
.cr-fav-btn,
.cr-x {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cr-fav-btn.active {
  color: #ffd36a;
  border-color: rgba(255,200,80,.45);
  background: rgba(255,200,80,.12);
}
.cr-open-again {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: #e23b52;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cr-open-again:disabled { opacity: .55; }

@media (prefers-reduced-motion: reduce) {
  .cr-card, .cr-screen, .cr-bottom, .cr-overlay { transition: none !important; }
}

.modal-card-img-glow {
  position:absolute; inset:0;
  background:linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.85) 100%);
  pointer-events:none;
}
.modal-rank-row {
  display:flex; align-items:center; gap:8px;
  margin-bottom:6px;
}
.modal-rank-badge {
  font-size:11px; font-weight:900; text-transform:uppercase;
  letter-spacing:2.5px; padding:5px 14px;
  border-radius:999px; border-width:1px; border-style:solid;
}
.modal-new-badge {
  display:inline-flex; align-items:center; gap:6px;
  background:linear-gradient(135deg,#ff5959,#c02020);
  color:#fff; font-size:10px; font-weight:900;
  padding:5px 14px; border-radius:999px;
  letter-spacing:1px; box-shadow:0 0 14px rgba(255,75,75,0.5);
  animation:newBadgePulse 1.6s ease-in-out infinite;
}
@keyframes newBadgePulse { 0%,100%{box-shadow:0 0 14px rgba(255,75,75,0.5)} 50%{box-shadow:0 0 28px rgba(255,75,75,0.85)} }
.modal-card-name {
  font-size:22px; font-weight:900; line-height:1.15;
  margin-bottom:4px; text-transform:uppercase; letter-spacing:1.5px;
  padding:0 20px;
}
.modal-card-verce {
  font-size:11px; font-weight:700; color:var(--text-sub);
  text-transform:uppercase; letter-spacing:1.5px;
  margin-bottom:20px;
}
.modal-rarity-bar {
  width:calc(100% - 40px); height:3px;
  border-radius:2px; margin:0 20px 20px;
  opacity:0.7;
}
.modal-stats-row { display:flex; gap:10px; width:calc(100% - 40px); }
.modal-stat-box {
  flex:1; padding:14px 8px; border-radius:20px;
  background:rgba(255,255,255,0.04);
  border-width:1px; border-style:solid;
  transition:.2s;
}
.modal-stat-icon { font-size:18px; margin-bottom:6px; }
.modal-stat-val { font-size:20px; font-weight:900; color:var(--text); margin-bottom:3px; }
.modal-stat-lbl { font-size:9px; font-weight:800; color:var(--text-sub); text-transform:uppercase; letter-spacing:1px; }
/* sparkle particles on new card */
@keyframes sparkle { 0%{transform:translate(0,0) scale(1);opacity:1} 100%{transform:translate(var(--dx),var(--dy)) scale(0);opacity:0} }
.spark {
  position:absolute; width:6px; height:6px;
  border-radius:50%; pointer-events:none;
  animation:sparkle .8s ease-out forwards;
}

/* ═══════════════════════════════════════
   ARENA — PvP Battle System
═══════════════════════════════════════ */

/* LOBBY */
.arena-lobby-card {
  padding:36px 24px 24px;
  margin-bottom:20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,89,89,0.18) 0%, transparent 26%),
    linear-gradient(160deg, rgba(34,35,39,0.98) 0%, rgba(16,16,19,0.96) 58%, rgba(255,75,75,0.14) 100%);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:28px;
  box-shadow:0 24px 46px rgba(0,0,0,0.52), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter:blur(6px);
  position:relative;
}
.arena-lobby-card::before {
  content:'CURRENT RANK';
  position:absolute;
  top:16px;
  left:50%;
  transform:translateX(-50%);
  color:var(--accent);
  font-size:10px;
  font-weight:900;
  letter-spacing:0.18em;
  text-transform:uppercase;
  opacity:0.8;
}
.arena-lobby-card::after {
  content:'';
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:20px;
  background:linear-gradient(to top, rgba(255,75,75,0.08) 0%, transparent 100%);
  border-radius:0 0 28px 28px;
}
.arena-vs-banner {
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  margin-bottom:24px; padding:24px 16px;
  background:linear-gradient(90deg, rgba(255,75,75,0.08) 0%, transparent 50%, rgba(255,75,75,0.08) 100%);
  border-radius:20px;
  border:1px solid var(--border);
}
.arena-vs-left, .arena-vs-right {
  display:flex; flex-direction:column; align-items:center; gap:10px; flex:1;
}
.arena-vs-mid {
  font-size:36px; font-weight:900; color:var(--accent);
  text-shadow:0 0 20px rgba(255,75,75,0.6); letter-spacing:4px;
  animation:vsPulse 2s ease-in-out infinite;
}
@keyframes vsPulse { 0%,100%{opacity:1} 50%{opacity:0.7} }
.arena-vs-avatar {
  width:72px; height:72px; border-radius:50%;
  background:linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-card) 100%);
  display:flex; align-items:center; justify-content:center;
  font-size:32px; border:3px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.arena-vs-name {
  font-size:12px; font-weight:800; color:var(--text);
  text-transform:uppercase; letter-spacing:1.5px; max-width:100px; text-align:center;
}
.arena-team-preview {
  display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin:32px 0 16px 0;
}
.arena-team-slot {
  background:linear-gradient(145deg, var(--bg-hover) 0%, var(--bg-card) 100%);
  border-radius:16px; padding:12px 8px; text-align:center;
  font-size:10px; font-weight:700; color:var(--text-sub);
  border:1px solid var(--border); min-height:80px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; transition:all .3s cubic-bezier(0.4,0,0.2,1);
  box-shadow:0 4px 12px rgba(0,0,0,0.3);
}
.arena-team-slot:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,0.4); }
.arena-team-slot.filled {
  border-color:rgba(255,75,75,0.5); color:var(--text);
  background:linear-gradient(145deg, rgba(255,75,75,0.1) 0%, var(--bg-card) 100%);
}
.arena-slot-rank { font-size:24px; filter:drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.arena-slot-name {
  font-size:9px; text-transform:uppercase; letter-spacing:.5px;
  overflow:hidden; text-overflow:ellipsis; width:100%; white-space:nowrap;
}

#arena-lobby .action-row { margin-bottom:12px; }
#arena-lobby .action-pill {
  padding:16px 14px;
  min-height:54px;
  background:var(--bg-card);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}
#arena-lobby .action-pill:not(.accent-btn) {
  color:rgba(255,255,255,0.88);
}
#arena-lobby .accent-btn {
  background:var(--accent);
  box-shadow:var(--glow);
}
#arena-lobby + #arena-lb-wrap,
#arena-lb-wrap { margin-top:24px; }
#arena-lb-wrap .section-title,
#arena-lb-wrap .section-heading {
  margin-top:0;
}
.filter-pill {
  backdrop-filter:blur(10px);
}
.filter-pill.active {
  background:linear-gradient(135deg, rgba(255,75,75,.24), rgba(255,75,75,.07));
}

/* LOADING */
#arena-loading {
  width:100%; min-height:calc(100dvh - 178px); padding:24px 0 108px;
  align-items:center; justify-content:center;
}
.arena-loading-box {
  width:min(100%, 390px); display:grid; grid-template-columns:116px minmax(0,1fr);
  gap:15px; align-items:center; padding:12px;
  border:1px solid var(--border-hot); border-radius:18px;
  background:color-mix(in srgb, var(--bg-card) 94%, transparent);
  box-shadow:0 18px 46px rgba(7,8,12,.34), inset 0 1px 0 rgba(255,255,255,.06);
  animation:arena-loading-enter .24s cubic-bezier(.2,.8,.2,1) both;
}
.arena-loading-art {
  position:relative; width:116px; aspect-ratio:1; overflow:hidden;
  border-radius:13px; background:var(--bg-hover);
}
.arena-loading-art::after {
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, transparent 54%, rgba(9,10,13,.64));
}
.arena-loading-art img { width:100%; height:100%; display:block; object-fit:cover; }
.arena-loading-copy { min-width:0; }
.arena-loading-kicker {
  display:block; margin-bottom:5px; color:var(--accent); font-size:9px;
  font-weight:850; letter-spacing:.14em; text-transform:uppercase;
}
.arena-loading-title {
  color:var(--text); font-size:18px; font-weight:900; line-height:1.08;
}
.arena-loading-sub {
  min-height:18px; margin-top:7px; color:var(--text-sub); font-size:11px; font-weight:650;
}
.arena-loading-scan {
  height:3px; margin-top:14px; overflow:hidden; border-radius:99px;
  background:var(--bg-hover);
}
.arena-loading-scan i {
  display:block; width:42%; height:100%; border-radius:inherit; background:var(--accent);
  animation:arena-loading-scan 1.1s cubic-bezier(.45,0,.55,1) infinite alternate;
}
.arena-loading-cancel {
  grid-column:1/-1; min-height:40px; border:1px solid var(--border); border-radius:12px;
  background:var(--bg-hover); color:var(--text); font-size:11px; font-weight:800;
}
.arena-loading-cancel:active { transform:scale(.98); }
@keyframes arena-loading-enter {
  from { opacity:0; transform:translateY(8px) scale(.985); }
  to { opacity:1; transform:none; }
}
@keyframes arena-loading-scan {
  from { transform:translateX(-4%); }
  to { transform:translateX(142%); }
}
@media (max-width:380px) {
  .arena-loading-box { grid-template-columns:96px minmax(0,1fr); gap:12px; }
  .arena-loading-art { width:96px; }
  .arena-loading-title { font-size:16px; }
}
@media (prefers-reduced-motion:reduce) {
  .arena-loading-box { animation:none; }
  .arena-loading-scan i { width:100%; animation:none; opacity:.72; }
}

/* BATTLE */
.battle-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 8px 16px; margin-bottom:8px;
  border-bottom:1px solid var(--border);
}
.battle-round {
  font-size:16px; font-weight:900; text-transform:uppercase; letter-spacing:2px;
  color:var(--accent); text-shadow:0 0 12px rgba(255,75,75,0.4);
  background:var(--accent-dim); padding:8px 16px; border-radius:12px;
}
.battle-fighters {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin-bottom:20px; padding:20px 16px;
  background:linear-gradient(145deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  border-radius:24px; border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,0.4);
}
.battle-side {
  flex:1; display:flex; flex-direction:column; align-items:center; gap:8px;
}
.battle-avatar {
  width:60px; height:60px; border-radius:50%;
  background:linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-card) 100%);
  display:flex; align-items:center; justify-content:center;
  font-size:26px; border:3px solid var(--border);
  box-shadow:0 6px 16px rgba(0,0,0,0.4);
}
.battle-name {
  font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:1px;
  color:var(--text); max-width:90px; text-align:center; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap;
}
.battle-vs-center {
  font-size:24px; font-weight:900; color:var(--accent);
  text-shadow:0 0 16px rgba(255,75,75,0.5); animation:vsPulse 2s ease-in-out infinite;
}
.battle-atk {
  font-size:13px; font-weight:800; color:var(--accent);
  background:var(--accent-dim); padding:4px 12px; border-radius:8px;
}

/* HP BARS */
.hp-bar-wrap { width:100%; max-width:120px; }
.hp-bar-bg {
  width:100%; height:10px; background:var(--bg-hover);
  border-radius:6px; overflow:hidden; box-shadow:inset 0 2px 4px rgba(0,0,0,0.3);
}
.hp-bar-fill {
  height:100%; border-radius:6px; transition:width .5s cubic-bezier(0.4,0,0.2,1);
  box-shadow:0 0 12px currentColor;
}
.hp-bar-fill.hp-me { background:linear-gradient(90deg,#4ade80,#22c55e); color:#22c55e; }
.hp-bar-fill.hp-opp { background:linear-gradient(90deg,#f87171,#ef4444); color:#ef4444; }
.hp-text {
  font-size:11px; font-weight:800; color:var(--text-sub);
  text-align:center; margin-top:6px; letter-spacing:0.5px;
}

/* BATTLE LOG */
.battle-log {
  background:linear-gradient(145deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  border-radius:20px; padding:16px; min-height:140px; max-height:220px;
  overflow-y:auto; margin-bottom:20px; border:1px solid var(--border);
  font-size:12px; line-height:1.8; box-shadow:inset 0 2px 8px rgba(0,0,0,0.3);
}
.battle-log-entry {
  margin-bottom:6px; padding:6px 0; border-bottom:1px solid var(--border);
  animation:logFadeIn 0.3s ease;
}
@keyframes logFadeIn { from{opacity:0;transform:translateX(-10px)} to{opacity:1;transform:translateX(0)} }
.battle-log-entry:last-child { border-bottom:none; }
.battle-log-dmg { color:var(--accent); font-weight:800; }
.battle-log-heal { color:#4ade80; font-weight:800; }

/* BATTLE ACTIONS */
.battle-actions { display:flex; gap:12px; }
.battle-actions .action-btn-large { flex:1; }
.battle-attack {
  background:linear-gradient(135deg, var(--accent) 0%, #cc3a3a 100%)!important;
  color:#fff!important; box-shadow:0 8px 24px rgba(255,75,75,0.4)!important;
  border:none!important;
}
.battle-attack:hover { filter:brightness(1.1); }
.battle-skip {
  background:linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-card) 100%)!important;
  color:var(--text)!important; border:1px solid var(--border);
}

/* RESULT */
.arena-result-box {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:16px; padding:50px 24px; text-align:center;
}
.arena-result-icon {
  font-size:80px; line-height:1;
  filter:drop-shadow(0 0 24px rgba(255,75,75,0.6));
  animation:resultPop 1s cubic-bezier(0.4,0,0.2,1);
}
@keyframes resultPop { 0%{transform:scale(0)} 50%{transform:scale(1.2)} 100%{transform:scale(1)} }
.arena-result-title {
  font-size:28px; font-weight:900; text-transform:uppercase; letter-spacing:3px;
  background:linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
}
.arena-result-stats {
  font-size:14px; color:var(--text-sub); line-height:2; font-weight:600;
  background:var(--bg-hover); padding:16px 24px; border-radius:16px;
  border:1px solid var(--border);
}

/* ARENA STATS SCREEN */
#arena-stats-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:12px;
}
#arena-stats-grid .stat-tile {
  padding:18px 12px; background:linear-gradient(145deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  border:1px solid var(--border); box-shadow:0 4px 12px rgba(0,0,0,0.3);
}

/* DAMAGE FLASH */
@keyframes dmgFlash { 0%{background:rgba(255,75,75,0.4)} 100%{background:transparent} }
.dmg-flash { animation:dmgFlash .4s ease; }

/* ACTION BUTTON LARGE */
.action-btn-large {
  width:100%; padding:20px 28px; background:linear-gradient(145deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  border-radius:var(--radius-pill); color:var(--text); font-family:inherit;
  font-size:15px; font-weight:900; cursor:pointer; transition:all .3s cubic-bezier(0.4,0,0.2,1);
  text-align:center; box-shadow:0 6px 20px rgba(0,0,0,0.4);
  border:1px solid var(--border); text-transform:uppercase; letter-spacing:1.5px;
}
.action-btn-large:active { transform:scale(0.94); box-shadow:0 2px 8px rgba(0,0,0,0.3); }

/* ── MOBILE ADAPTIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .section-heading { margin-top:0; margin-bottom:8px; }
  .arena-lobby-card { padding:32px 16px 20px; margin-bottom:16px; }
  .arena-stat-row { min-height:96px; }
  .arena-stat-val { font-size:34px; }
  #ar-league { font-size:30px; }
  #arena-lobby .action-row { gap:10px; margin-bottom:10px; }
  #arena-lobby .action-pill { min-height:50px; padding:12px 10px; font-size:13px; }
  #arena-lb-wrap { margin-top:24px; }
  .arena-vs-banner {
    gap:12px; padding:16px 12px; margin-bottom:16px;
  }
  .arena-vs-avatar {
    width:56px; height:56px; font-size:24px;
  }
  .arena-vs-mid {
    font-size:28px; letter-spacing:2px;
  }
  .arena-team-preview {
    gap:8px; margin:16px 0;
  }
  .arena-team-slot {
    min-height:70px; padding:8px 4px;
  }
  .arena-slot-rank { font-size:18px; }
  .arena-slot-name { font-size:8px; }
  .battle-fighters {
    gap:12px; padding:16px 12px;
  }
  .battle-avatar {
    width:52px; height:52px; font-size:22px;
  }
  .battle-vs-center { font-size:20px; }
  .hp-bar-wrap { max-width:100px; }
  .battle-log {
    padding:12px; min-height:120px; font-size:11px;
  }
  .action-btn-large {
    padding:16px 20px; font-size:14px;
  }
}

/* ══════════════════════════════════════════════════════════════
   GAMES — Premium design system
══════════════════════════════════════════════════════════════ */
#tab-games.active { gap:14px; }

/* ── Hero (minimal one-line) ── */
.games-hero {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:18px; padding:14px 16px;
}
.games-hero-row {
  display:flex; align-items:center; justify-content:space-between; gap:14px;
}
.games-hero-title {
  font-size:15px; font-weight:900; letter-spacing:.04em;
}
.games-hero-balances { display:flex; gap:10px; }
.hero-bal {
  display:inline-flex; align-items:center; gap:5px;
  font-size:14px; font-weight:800; color:var(--text);
}
.hero-bal-ico { font-size:13px; opacity:.85; }

/* ── Game picker (clean, no themes) ── */
.games-picker {
  display:grid; grid-template-columns:1fr 1fr; gap:8px;
}
.game-pick-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:16px; padding:14px 10px 12px; text-align:center;
  cursor:pointer; transition:border-color .15s, transform .15s;
  user-select:none; display:flex; flex-direction:column;
  align-items:center; justify-content:center; min-height:96px;
  -webkit-tap-highlight-color:transparent;
}
.game-pick-card:active { transform:scale(.96); }
.game-pick-card.game-pick-active {
  border-color:var(--accent);
}
.game-pick-icon {
  font-size:26px; line-height:1; margin-bottom:8px;
  pointer-events:none;
}
.game-pick-name, .game-pick-status { pointer-events:none; }
.game-pick-name {
  font-weight:800; font-size:12px; color:var(--text);
  letter-spacing:.06em;
}
.game-pick-status {
  font-size:9px; color:var(--text-sub); font-weight:700;
  margin-top:3px; letter-spacing:.08em;
}
.game-pick-card.game-pick-active .game-pick-status {
  color:var(--accent);
}

/* Theme classes — kept minimal, only used by panels not picker */
.theme-dice-header,
.theme-slots-header,
.theme-bj-header,
.theme-guess-header { color:var(--text-sub); }

/* ── Panel header ── */
.game-panel-header {
  font-size:12px; font-weight:800; letter-spacing:.12em;
  color:var(--text-sub); padding:2px 0 6px;
  border-bottom:1px solid var(--border);
}

/* ── Section label ── */
.section-label {
  font-size:10px; font-weight:800; letter-spacing:.1em;
  color:var(--text-sub); margin-bottom:12px;
}

/* ── Bet input row ── */
.bet-input-row {
  display:flex; align-items:center; gap:10px;
  background:var(--bg-hover); border-radius:16px;
  padding:4px 18px; margin-bottom:12px;
}
.bet-input {
  flex:1; background:transparent; color:var(--text);
  font-size:22px; font-weight:900; padding:11px 0;
  font-family:inherit; border:none; outline:none;
}
.bet-input::placeholder { color:rgba(255,255,255,.2); }

/* ── Quick bet buttons ── */
.quick-bets {
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
}
.qb-btn {
  background:var(--bg-hover); border:1.5px solid rgba(255,255,255,.07);
  color:var(--text); border-radius:12px; padding:10px 0;
  font-size:13px; font-weight:700; cursor:pointer;
  transition:background .15s, border-color .15s, transform .1s;
}
.qb-btn:active { transform:scale(.94); }
.qb-btn:hover  { background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.15); }
.qb-max {
  color:var(--accent); border-color:rgba(255,75,75,.25);
  background:rgba(255,75,75,.06);
}

/* ── Main action button ── */
.game-btn {
  width:100%; color:#fff; border:none; border-radius:20px;
  padding:18px; font-weight:900; font-size:15px;
  letter-spacing:2px; text-transform:uppercase;
  cursor:pointer; transition:opacity .2s, transform .15s;
}
.game-btn:active { transform:scale(.97); opacity:.9; }
.game-btn:disabled { opacity:.45; cursor:not-allowed; transform:none; }

/* ── Cooldown card ── */
.cd-card {
  background:var(--bg-card); border-radius:var(--radius-card);
  padding:16px 18px; border:1px solid var(--border); text-align:center;
}
.cd-label {
  font-size:10px; font-weight:800; color:var(--text-sub);
  letter-spacing:.1em; margin-bottom:8px;
}
.cd-time {
  font-size:30px; font-weight:900; font-variant-numeric:tabular-nums;
  color:var(--accent); letter-spacing:.04em;
}
.cd-bar-wrap {
  margin-top:10px; height:5px; background:var(--bg-hover);
  border-radius:99px; overflow:hidden;
}
.cd-bar {
  height:100%; background:var(--accent); border-radius:99px;
  transition:width 1s linear; width:0%;
}

/* ══════════════════════════════════════════════════════════════
   🎰 SLOT MACHINE
══════════════════════════════════════════════════════════════ */
.slot-machine {
  position:relative; padding:18px 14px 16px;
  border-radius:24px;
  background:
    linear-gradient(180deg, #2a1a05 0%, #1a0f02 100%);
  border:1px solid rgba(245,158,11,0.25);
  box-shadow:
    inset 0 1px 0 rgba(255,200,80,0.15),
    inset 0 -2px 8px rgba(0,0,0,0.4),
    0 8px 24px rgba(245,158,11,0.12);
  overflow:hidden;
}
.slot-machine::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg,
    transparent, #fbbf24 20%, #f59e0b 50%, #fbbf24 80%, transparent);
}
.slot-machine-lights {
  display:flex; justify-content:space-between; gap:4px;
  margin-bottom:14px; padding:0 4px;
}
.slot-machine-lights span {
  width:6px; height:6px; border-radius:50%;
  background:#3a2308; box-shadow:inset 0 0 2px rgba(0,0,0,0.6);
  transition:background .3s, box-shadow .3s;
}
.slot-machine.lit .slot-machine-lights span {
  background:#fbbf24; box-shadow:0 0 8px #fbbf24, 0 0 14px rgba(251,191,36,0.6);
  animation:light-blink .4s infinite alternate;
}
.slot-machine.lit .slot-machine-lights span:nth-child(2n) { animation-delay:.2s; }
.slot-machine.lit .slot-machine-lights span:nth-child(3n) { animation-delay:.1s; }
@keyframes light-blink {
  from { opacity:.4; }
  to   { opacity:1; }
}
.slot-machine-screen {
  position:relative;
  background:linear-gradient(180deg, #050507 0%, #0e0e14 50%, #050507 100%);
  border-radius:18px; padding:18px 10px;
  border:2px solid rgba(0,0,0,0.6);
  box-shadow:
    inset 0 4px 12px rgba(0,0,0,0.7),
    inset 0 -1px 0 rgba(255,255,255,0.04),
    0 0 0 1px rgba(245,158,11,0.15);
}
.slot-machine-line {
  position:absolute; top:50%; left:8px; right:8px; height:2px;
  background:linear-gradient(90deg, transparent, rgba(245,158,11,0.5), transparent);
  transform:translateY(-1px); pointer-events:none;
}
.slot-reels {
  display:flex; justify-content:center; gap:8px; position:relative; z-index:1;
}
.slot-reel {
  width:80px; height:90px;
  background:linear-gradient(180deg, #fafafa 0%, #e5e5e5 50%, #fafafa 100%);
  border:1px solid rgba(0,0,0,0.4); border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:42px; line-height:1; user-select:none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 2px 6px rgba(0,0,0,0.4);
  transition:transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .4s;
  overflow:hidden;
}
.slot-reel.spinning {
  filter:blur(2px);
  animation:reel-spin .08s linear infinite;
}
@keyframes reel-spin {
  0%   { transform:translateY(-12px); }
  100% { transform:translateY(12px);  }
}
.slot-reel.winner {
  background:linear-gradient(180deg, #fff8d6 0%, #ffd700 50%, #fff8d6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 0 24px rgba(255,215,0,0.7),
    0 0 48px rgba(255,215,0,0.3);
  animation:winner-pulse .8s ease-in-out;
}
@keyframes winner-pulse {
  0%, 100% { transform:scale(1.05); }
  50%      { transform:scale(1.18); }
}
.slot-machine-label {
  text-align:center; margin-top:14px; font-size:13px;
  font-weight:800; color:#fbbf24; letter-spacing:.05em;
  text-shadow:0 0 10px rgba(251,191,36,0.4); min-height:20px;
}

/* ══════════════════════════════════════════════════════════════
   🃏 BLACKJACK FELT TABLE
══════════════════════════════════════════════════════════════ */
.bj-felt {
  position:relative; padding:18px 16px;
  border-radius:24px;
  background:
    radial-gradient(ellipse at center, #0a5e3a 0%, #053826 70%, #032118 100%);
  border:2px solid rgba(139,92,246,0.3);
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 28px rgba(139,92,246,0.15);
  overflow:hidden;
}
.bj-felt::before {
  content:''; position:absolute; inset:0;
  background:radial-gradient(circle at 50% 0%, rgba(139,92,246,0.12), transparent 60%);
  pointer-events:none;
}
.bj-section { position:relative; z-index:1; }
.bj-section-label {
  font-size:11px; font-weight:800; letter-spacing:.14em;
  color:rgba(255,255,255,0.65); margin-bottom:10px;
  display:flex; align-items:center; gap:8px;
}
.bj-dot {
  width:8px; height:8px; border-radius:50%;
  background:#ef4444; box-shadow:0 0 8px #ef4444;
  animation:dot-pulse 1.4s ease-in-out infinite;
}
.bj-dot-player {
  background:#22c55e; box-shadow:0 0 8px #22c55e;
}
@keyframes dot-pulse {
  0%, 100% { opacity:1;   transform:scale(1);    }
  50%      { opacity:.45; transform:scale(1.25); }
}
.bj-cards-row {
  display:flex; gap:8px; flex-wrap:wrap; min-height:88px; align-items:center;
}
.bj-divider {
  height:1px; margin:14px 0;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  position:relative; z-index:1;
}
.bj-score {
  font-size:16px; font-weight:900; color:#ffd700;
  text-shadow:0 0 8px rgba(255,215,0,.4);
}

.bj-card {
  width:58px; height:84px; border-radius:10px; padding:5px 7px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-size:18px; font-weight:900; line-height:1;
  background:linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
  box-shadow:0 4px 12px rgba(0,0,0,.55), 0 1px 0 rgba(0,0,0,.3);
  border:1px solid rgba(0,0,0,0.1);
  animation:card-deal .35s cubic-bezier(.34,1.56,.64,1);
  transform-origin:50% 50%;
}
.bj-card-back {
  width:58px; height:84px; border-radius:10px;
  background:
    linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #4f46e5 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 4px, transparent 4px 8px);
  background-blend-mode:overlay;
  display:flex; align-items:center; justify-content:center;
  font-size:28px;
  box-shadow:0 4px 12px rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,0.15);
  animation:card-deal .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes card-deal {
  0%   { opacity:0; transform:translate(-30px,-25px) rotate(-12deg) scale(.7); }
  60%  { opacity:1; transform:translate(0,0)         rotate(3deg)   scale(1.04); }
  100% { opacity:1; transform:translate(0,0)         rotate(0)      scale(1); }
}

/* ══════════════════════════════════════════════════════════════
   🎯 GUESS STAGE
══════════════════════════════════════════════════════════════ */
.guess-stage {
  position:relative; overflow:hidden; text-align:center;
  padding:32px 16px 26px; border-radius:24px;
  background:linear-gradient(180deg, #0a1929 0%, #061018 100%);
  border:1px solid rgba(14,165,233,0.25);
  box-shadow:0 8px 28px rgba(14,165,233,0.12);
}
.guess-stage-glow {
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(14,165,233,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(124,58,237,0.15) 0%, transparent 50%);
  animation:guess-glow 4s ease-in-out infinite alternate;
}
@keyframes guess-glow {
  from { opacity:.6; transform:scale(.95); }
  to   { opacity:1;  transform:scale(1.1); }
}
.guess-dice {
  position:relative; z-index:1;
  font-size:96px; line-height:1; display:inline-block;
  filter:drop-shadow(0 8px 24px rgba(14,165,233,.4));
}
.guess-stage-text {
  position:relative; z-index:1;
  font-size:13px; color:rgba(255,255,255,0.65); margin-top:18px;
  letter-spacing:.02em;
}

/* Guess number buttons */
.guess-num-btn {
  background:#0e1722; border:2px solid rgba(255,255,255,.06);
  color:var(--text); border-radius:14px; padding:14px 4px;
  font-size:12px; font-weight:800; cursor:pointer;
  transition:all .2s cubic-bezier(.34,1.56,.64,1);
  display:flex; flex-direction:column; align-items:center; gap:3px;
  line-height:1; -webkit-tap-highlight-color:transparent;
}
.guess-num-btn:active { transform:scale(.88); }
.guess-num-btn.active {
  background:linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  border-color:#38bdf8; color:#fff;
  box-shadow:0 0 18px rgba(14,165,233,.55), inset 0 1px 0 rgba(255,255,255,.2);
  transform:translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════
   🎲 DICE / shared
══════════════════════════════════════════════════════════════ */
@keyframes dice-spin {
  0%   { transform:rotate(0deg)   scale(1);   }
  25%  { transform:rotate(90deg)  scale(.75); }
  50%  { transform:rotate(180deg) scale(1.15); }
  75%  { transform:rotate(270deg) scale(.75); }
  100% { transform:rotate(360deg) scale(1);   }
}
.dice-rolling { animation:dice-spin .15s linear infinite; }

/* ══════════════════════════════════════════════════════════════
   THEMED ACTION BUTTONS
══════════════════════════════════════════════════════════════ */
.game-btn-dice {
  background:linear-gradient(135deg, #ff4b4b 0%, #ff6020 100%);
  box-shadow:0 6px 24px rgba(255,75,75,.4),
             inset 0 1px 0 rgba(255,255,255,.25);
}
.game-btn-slots {
  background:linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
  box-shadow:0 6px 24px rgba(245,158,11,.4),
             inset 0 1px 0 rgba(255,255,255,.25);
}
.game-btn-bj {
  background:linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
  box-shadow:0 6px 24px rgba(139,92,246,.4),
             inset 0 1px 0 rgba(255,255,255,.25);
}
.game-btn-guess {
  background:linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #7c3aed 100%);
  box-shadow:0 6px 24px rgba(14,165,233,.4),
             inset 0 1px 0 rgba(255,255,255,.25);
}

/* ══════════════════════════════════════════════════════════════
   RESULT CARD
══════════════════════════════════════════════════════════════ */
.game-result-card {
  background:var(--bg-card); border-radius:var(--radius-card);
  padding:20px; border:1px solid var(--border); text-align:center;
  animation:result-pop .4s cubic-bezier(.34,1.56,.64,1);
  position:relative; overflow:hidden;
}
.game-result-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, transparent, currentColor, transparent);
  opacity:.3;
}
@keyframes result-pop {
  from { opacity:0; transform:scale(.85) translateY(12px); }
  to   { opacity:1; transform:scale(1)   translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   CONFETTI
══════════════════════════════════════════════════════════════ */
#confetti-root {
  position:fixed; inset:0; pointer-events:none; z-index:9999;
  overflow:hidden;
}
.confetti-piece {
  position:absolute; top:-20px; width:9px; height:14px;
  border-radius:2px; opacity:0;
  animation:confetti-fall 2.4s cubic-bezier(.4,.6,.6,1) forwards;
}
@keyframes confetti-fall {
  0%   { opacity:0; transform:translateY(0) rotate(0); }
  10%  { opacity:1; }
  100% { opacity:0; transform:translateY(110vh) rotate(720deg); }
}

/* ══════════════════════════════════════════════════════════════
   CLAN HALL — visual system
══════════════════════════════════════════════════════════════ */
#tab-clan.clan-shell {
  --clan-ink: #0c0d11;
  --clan-panel: #14161d;
  --clan-line: rgba(232, 196, 120, 0.18);
  --clan-gold: #e8c478;
  --clan-gold-deep: #b8893a;
  --clan-blood: #e04545;
  --clan-mint: #5fd0a5;
  --clan-fog: rgba(255,255,255,0.045);
  position: relative;
}
#tab-clan.clan-shell::before {
  content: '';
  position: absolute; inset: -8px -12px auto -12px; height: 220px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 70% at 15% 0%, rgba(232,196,120,0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(224,69,69,0.10), transparent 50%);
}
#tab-clan.clan-shell > * { position: relative; z-index: 1; }

@keyframes clanRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes clanPulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes clanShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes clanFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes warPick {
  0% { transform: scale(.96); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes warLive {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,69,69,.45); }
  50% { box-shadow: 0 0 0 6px rgba(224,69,69,0); }
}

.clan-subnav {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  margin: 0 0 16px; padding: 5px;
  background: rgba(8,9,12,.72);
  border: 1px solid var(--clan-line);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}
.clan-tab-btn {
  display: grid; gap: 3px; place-items: center;
  background: transparent; border: 0; color: #8b909c;
  padding: 9px 2px 8px; border-radius: 13px;
  font-family: inherit; font-size: 10px; font-weight: 800;
  letter-spacing: .02em; cursor: pointer;
  transition: color .2s, background .2s, transform .18s;
}
.clan-tab-btn i {
  font-style: normal; font-size: 13px; line-height: 1; opacity: .75;
  font-family: 'Syne', Outfit, sans-serif;
}
.clan-tab-btn.active {
  background: linear-gradient(180deg, rgba(232,196,120,.22), rgba(232,196,120,.08));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(232,196,120,.28);
}
.clan-tab-btn.active i { color: var(--clan-gold); opacity: 1; }
.clan-tab-btn:active { transform: scale(.96); }

.clan-panel { display: none; }
.clan-panel.active {
  display: block;
  animation: clanRise .38s cubic-bezier(.2,.8,.2,1) both;
}

.clan-sec-head {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 10px;
}
.clan-sec-title {
  margin: 0; font-family: 'Syne', Outfit, sans-serif;
  font-size: 13px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #d7dbe5; white-space: nowrap;
}
.clan-sec-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(232,196,120,.35), transparent 85%);
}

/* Empty state */
.clan-empty-stage {
  position: relative; overflow: hidden;
  padding: 36px 20px 28px; text-align: center;
  border-radius: 26px; border: 1px solid var(--clan-line);
  background:
    linear-gradient(160deg, rgba(232,196,120,.08), transparent 40%),
    linear-gradient(180deg, #161821 0%, #0e1016 100%);
  animation: clanRise .45s ease both;
}
.clan-empty-orb {
  position: absolute; width: 180px; height: 180px; border-radius: 50%;
  top: -60px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232,196,120,.22), transparent 68%);
  animation: clanPulse 4s ease-in-out infinite;
}
.clan-empty-mark {
  position: relative; width: 72px; height: 72px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 22px;
  font-family: 'Syne', sans-serif; font-size: 34px; font-weight: 800; color: #1a1408;
  background: linear-gradient(145deg, #f0d59a, var(--clan-gold-deep));
  box-shadow: 0 12px 30px rgba(184,137,58,.28);
  animation: clanFloat 3.2s ease-in-out infinite;
}
.clan-empty-kicker {
  position: relative; font-size: 10px; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: var(--clan-gold); margin-bottom: 8px;
}
.clan-empty-title {
  position: relative; font-family: 'Syne', sans-serif;
  font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px;
  color: #fff;
}
.clan-empty-text {
  position: relative; color: #9aa1b0; font-size: 14px; line-height: 1.55;
  margin: 0 auto 20px; max-width: 280px;
}
.clan-empty-steps { position: relative; display: grid; gap: 8px; text-align: left; }
.clan-empty-step {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  animation: clanRise .4s ease both;
}
.clan-empty-step:nth-child(1) { animation-delay: .05s; }
.clan-empty-step:nth-child(2) { animation-delay: .12s; }
.clan-empty-step:nth-child(3) { animation-delay: .19s; }
.clan-empty-step span {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(232,196,120,.14); color: var(--clan-gold);
  font-size: 12px; font-weight: 900;
}
.clan-empty-step b { display: block; font-size: 13px; color: #fff; }
.clan-empty-step small { display: block; margin-top: 2px; font-size: 11px; color: #8b909c; }
.clan-invites { margin-top: 14px; }

/* Home hero */
.clan-home-hero {
  position: relative; overflow: hidden; margin-bottom: 12px;
  border-radius: 24px; border: 1px solid var(--clan-line);
  background:
    linear-gradient(135deg, rgba(232,196,120,.14) 0%, transparent 42%),
    linear-gradient(180deg, #1a1c26 0%, #101218 100%);
  padding: 18px 16px 16px;
}
.clan-home-glow {
  position: absolute; width: 160px; height: 160px; right: -40px; top: -50px;
  background: radial-gradient(circle, rgba(232,196,120,.2), transparent 70%);
  pointer-events: none; animation: clanPulse 5s ease-in-out infinite;
}
.clan-home-top { display: flex; gap: 14px; align-items: center; position: relative; }
.clan-home-emblem {
  width: 70px; height: 70px; flex: 0 0 70px; border-radius: 20px;
  display: grid; place-items: center;
  font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; color: #1a1408;
  background: linear-gradient(145deg, #f3dfa8, var(--clan-gold-deep));
  box-shadow: 0 10px 24px rgba(184,137,58,.25);
  animation: clanFloat 3.6s ease-in-out infinite;
}
.clan-home-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--clan-gold); margin-bottom: 4px;
}
.clan-home-name {
  font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800;
  letter-spacing: -.02em; line-height: 1.1; color: #fff;
}
.clan-home-sub { font-size: 12px; color: #9aa1b0; margin: 5px 0 8px; font-weight: 600; }
.clan-home-level {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 900;
  color: #1a1408; background: var(--clan-gold); border-radius: 8px; padding: 3px 9px;
}
.clan-home-xp { margin-top: 16px; position: relative; }
.clan-home-xp-row {
  display: flex; justify-content: space-between; font-size: 11px; font-weight: 700;
  color: #9aa1b0; margin-bottom: 7px;
}
.clan-hero-xp-bar {
  height: 7px; border-radius: 99px; overflow: hidden;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.05);
}
.clan-hero-xp-fill {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--clan-gold-deep), var(--clan-gold), #f5e2b0, var(--clan-gold));
  background-size: 200% 100%;
  animation: clanShimmer 2.8s linear infinite;
  transition: width .55s cubic-bezier(.2,.8,.2,1);
}
.clan-home-actions { margin-top: 14px; display: grid; gap: 8px; }
.clan-home-actions .action-pill,
.clan-home-actions .clan-cta {
  width: 100%; min-height: 46px; border: 0; border-radius: 14px;
  font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, #f0d59a, var(--clan-gold-deep));
  color: #1a1408; transition: transform .16s, filter .16s;
}
.clan-home-actions .clan-cta.ghost {
  background: rgba(255,255,255,.05); color: #d7dbe5;
  border: 1px solid rgba(255,255,255,.08);
}
.clan-home-actions .action-pill:active,
.clan-home-actions .clan-cta:active { transform: scale(.98); }

/* KPI */
.clan-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.clan-kpi-row-3 { grid-template-columns: repeat(3, 1fr); }
.clan-kpi {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.06); padding: 12px 6px;
  border-radius: 16px; text-align: center;
  animation: clanRise .4s ease both;
  animation-delay: calc(var(--d, 0) * .06s);
}
.clan-kpi-val {
  font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800;
  color: #fff; margin-bottom: 3px;
}
.clan-kpi-lbl { font-size: 9px; font-weight: 700; color: #8b909c; text-transform: uppercase; letter-spacing: .06em; }
.accent-text { color: var(--clan-gold) !important; }

/* Members */
.clan-members { display: flex; flex-direction: column; gap: 8px; }
.clan-member {
  display: grid; grid-template-columns: 28px 38px 1fr auto; gap: 10px; align-items: center;
  background: var(--clan-fog); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 10px 12px;
  animation: clanRise .35s ease both;
  animation-delay: calc(var(--i, 0) * .04s);
  transition: border-color .2s, background .2s;
}
.clan-member:hover { border-color: rgba(232,196,120,.28); background: rgba(232,196,120,.05); }
.cm-rank {
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 800;
  color: #6f7584; text-align: center;
}
.cm-avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 14px; color: #1a1408;
  background: linear-gradient(145deg, #efe0b6, #c9a05a);
}
.cm-avatar.leader { background: linear-gradient(145deg, #ff8a7a, #e04545); color: #fff; }
.cm-avatar.vice { background: linear-gradient(145deg, #9ad0ff, #4a88c8); color: #fff; }
.cm-body { min-width: 0; }
.cm-name {
  font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-role { font-size: 10px; color: #8b909c; font-weight: 700; margin-top: 2px; }
.cm-pts {
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 800; color: var(--clan-gold);
  white-space: nowrap;
}

/* Clan admin / manage — no theme art, clear actions */
.clan-admin-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: min(52vh, 420px); overflow-y: auto; padding-right: 2px;
}
.clan-admin-row {
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 10px 12px;
}
.clan-admin-main {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; text-align: left; width: 100%; cursor: pointer;
}
.clan-admin-main .cm-body { flex: 1; min-width: 0; }
.clan-admin-main .cm-name {
  font-size: 14px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clan-admin-main .cm-role { font-size: 11px; color: #9aa0ae; font-weight: 700; margin-top: 2px; }
.clan-admin-acts {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 2px; border-top: 1px solid rgba(255,255,255,.06);
}
.cm-act {
  flex: 1 1 auto; min-width: 96px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 8px 10px;
  font-size: 12px; font-weight: 800; color: #e8eaf0;
  background: rgba(255,255,255,.06); cursor: pointer;
}
.cm-act.promote { background: rgba(80,180,100,.18); border-color: rgba(80,180,100,.35); color: #b6f0c0; }
.cm-act.demote { background: rgba(220,160,60,.16); border-color: rgba(220,160,60,.35); color: #f0d59a; }
.cm-act.kick { background: rgba(220,70,70,.18); border-color: rgba(220,70,70,.4); color: #ffb0b0; }
.cm-act:active { transform: scale(.97); }

/* Activity */
.clan-activity {
  background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px; padding: 6px 4px; max-height: 220px; overflow-y: auto;
}
.clan-log-item {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; padding: 10px 12px; color: #b4b9c5;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.clan-log-item:last-child { border-bottom: none; }
.clan-log-dot {
  width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; flex: 0 0 7px;
  background: var(--clan-gold);
}

/* Chat */
.clan-chat-wrap {
  display: flex; flex-direction: column; height: 62vh;
  background: linear-gradient(180deg, #151821, #101218);
  border: 1px solid var(--clan-line); border-radius: 22px; overflow: hidden;
}
.clan-chat-messages {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.clan-chat-input-row {
  display: flex; gap: 8px; padding: 12px;
  background: rgba(0,0,0,.28); border-top: 1px solid rgba(255,255,255,.05);
}
.clan-chat-input {
  flex: 1; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 0 14px; color: var(--text); font-size: 14px; outline: none;
}
.clan-chat-input:focus { border-color: rgba(232,196,120,.4); }
.clan-chat-send {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(145deg, #f0d59a, var(--clan-gold-deep));
  color: #1a1408; border: none; font-size: 18px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Treasury */
.clan-treasury-hero {
  position: relative; overflow: hidden; text-align: center; margin-bottom: 12px;
  padding: 28px 20px 24px; border-radius: 24px;
  border: 1px solid rgba(95,208,165,.22);
  background:
    linear-gradient(160deg, rgba(95,208,165,.12), transparent 50%),
    linear-gradient(180deg, #141c1a, #101218);
}
.treasury-glow {
  position: absolute; inset: auto 20% -40% 20%; height: 120px;
  background: radial-gradient(circle, rgba(95,208,165,.25), transparent 70%);
  pointer-events: none;
}
.treasury-kicker {
  position: relative; font-size: 10px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--clan-mint); margin-bottom: 8px;
}
.treasury-balance {
  position: relative; font-family: 'Syne', sans-serif;
  font-size: 40px; font-weight: 800; color: #fff; margin-bottom: 4px;
  letter-spacing: -.02em;
}
.treasury-label {
  position: relative; font-size: 12px; color: #8b909c; font-weight: 700; text-transform: uppercase;
}

/* Wars */
.clan-war-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  border-radius: 20px; padding: 16px; margin-bottom: 12px;
  border: 1px solid rgba(224,69,69,.28);
  background:
    linear-gradient(120deg, rgba(224,69,69,.16), rgba(232,196,120,.05) 55%, transparent),
    linear-gradient(180deg, #1a1216, #121018);
}
.war-banner-mark {
  position: absolute; right: -20px; top: -30px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,69,69,.25), transparent 70%);
  animation: clanPulse 3.5s ease-in-out infinite;
}
.war-banner-icon {
  position: relative; width: 48px; height: 48px; flex: 0 0 48px;
  display: grid; place-items: center; border-radius: 15px;
  background: rgba(224,69,69,.16); color: #ff8b8b; font-size: 22px;
  border: 1px solid rgba(224,69,69,.25);
}
.war-banner-copy { position: relative; min-width: 0; }
.war-banner-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: #ff8b8b; margin-bottom: 3px;
}
.war-banner-title {
  font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 2px;
}
.war-banner-sub { font-size: 12px; color: rgba(255,255,255,.55); font-weight: 600; }
.clan-kpi-wars .clan-kpi:nth-child(3) .clan-kpi-val { color: var(--clan-gold); }

.war-stage {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 16px 12px; margin-bottom: 12px;
  background:
    linear-gradient(180deg, rgba(224,69,69,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(224,69,69,.28);
  animation: clanRise .4s ease both;
}
.war-scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center;
  margin-bottom: 12px;
}
.war-score-side .war-name {
  font-size: 11px; font-weight: 800; margin-bottom: 4px; color: #b4b9c5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.war-score-side.right { text-align: right; }
.war-score-side .war-score {
  font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; color: #fff; line-height: 1;
}
.war-score-mid { text-align: center; }
.war-stage-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 900; letter-spacing: .16em;
  color: #ff6b6b; margin-bottom: 4px;
}
.war-stage-live span {
  width: 7px; height: 7px; border-radius: 50%; background: #ff4b4b;
  animation: warLive 1.4s ease-in-out infinite;
}
.war-time-left { font-size: 10px; color: #8b909c; font-weight: 700; }
.war-progress-wrap { margin-bottom: 12px; }
.war-progress-bar {
  height: 8px; border-radius: 99px; overflow: hidden;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.05);
}
.war-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clan-gold), var(--clan-blood));
  transition: width .5s ease;
}
.war-hint {
  margin-top: 10px; text-align: center; font-size: 11px; color: #8b909c; font-weight: 600;
}
.war-attacks-list { margin-top: 12px; display: grid; gap: 6px; }
.war-attack-row {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 9px 11px; border-radius: 12px; background: rgba(0,0,0,.28);
  font-size: 12px; color: #b4b9c5; animation: clanRise .3s ease both;
}
.war-primary-btn, .war-secondary-btn {
  width: 100%; min-height: 48px; margin-top: 12px; padding: 11px 14px;
  border-radius: 14px; font-family: inherit; font-size: 13px; line-height: 1.25;
  font-weight: 800; cursor: pointer; transition: transform .16s, opacity .16s, filter .16s;
}
.war-primary-btn {
  border: 0; color: #1a1408;
  background: linear-gradient(135deg, #f0d59a, var(--clan-gold-deep));
  box-shadow: 0 10px 24px rgba(184,137,58,.2);
}
.war-primary-btn:hover { filter: brightness(1.05); }
.war-secondary-btn {
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: #b4b9c5;
}
.war-primary-btn:active, .war-secondary-btn:active { transform: scale(.98); }
.war-primary-btn:disabled { opacity: .48; box-shadow: none; cursor: default; filter: none; }
.war-surrender-btn {
  background: rgba(224,69,69,.12) !important; color: #ff8b8b !important;
  border: 1px solid rgba(224,69,69,.35) !important;
}

.war-idle {
  border-radius: 22px; padding: 18px 16px; margin-bottom: 8px;
  background: linear-gradient(180deg, #161821, #111318);
  border: 1px solid rgba(255,255,255,.06);
}
.war-idle-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--clan-gold); margin-bottom: 6px;
}
.war-idle-title {
  font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 6px;
}
.war-idle-text { font-size: 13px; color: #9aa1b0; line-height: 1.5; margin: 0 0 14px; }
.war-setup-steps { display: grid; gap: 8px; margin: 14px 0 2px; }
.war-setup-steps > div {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center;
  padding: 10px; border-radius: 13px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.04);
  animation: clanRise .35s ease both;
}
.war-setup-steps > div:nth-child(1) { animation-delay: .04s; }
.war-setup-steps > div:nth-child(2) { animation-delay: .1s; }
.war-setup-steps > div:nth-child(3) { animation-delay: .16s; }
.war-setup-steps > div > span {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px;
  background: rgba(232,196,120,.12); color: var(--clan-gold); font-size: 12px; font-weight: 900;
}
.war-setup-steps p { margin: 0; min-width: 0; }
.war-setup-steps b { display: block; font-size: 12px; color: #fff; line-height: 1.25; }
.war-setup-steps small { display: block; margin-top: 2px; font-size: 10px; color: #8b909c; line-height: 1.25; }

.war-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.war-list-col {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 10px; min-height: 220px;
}
.war-list-col.mine { border-color: rgba(232,196,120,.18); }
.war-list-col.enemy {
  border-color: rgba(224,69,69,.28);
  background: rgba(224,69,69,.04);
}
.war-list-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  color: #8b909c; margin-bottom: 8px;
}
.war-list-col.enemy .war-list-title { color: #ff8b8b; }
.war-list-col.mine .war-list-title { color: var(--clan-gold); }
.war-fighter {
  width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center;
  text-align: left; padding: 8px; margin-bottom: 6px; border-radius: 12px;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.06);
  color: #fff; cursor: default;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  animation: clanRise .3s ease both;
}
.war-fighter.enemy { cursor: pointer; }
.war-fighter.enemy:not(:disabled):hover {
  border-color: rgba(232,196,120,.5); transform: translateY(-1px);
}
.war-fighter.enemy.selected {
  border-color: var(--clan-gold);
  box-shadow: 0 0 0 1px rgba(232,196,120,.3), 0 8px 18px rgba(184,137,58,.14);
  animation: warPick .35s ease;
}
.war-fighter.defeated, .war-fighter.observer { opacity: .4; filter: grayscale(1); }
.war-fighter.defeated .war-f-name { text-decoration: line-through; }
.war-f-avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 13px;
  background: rgba(232,196,120,.16); color: var(--clan-gold);
}
.war-list-col.enemy .war-f-avatar { background: rgba(224,69,69,.16); color: #ff8b8b; }
.war-f-name { font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.war-f-meta { font-size: 10px; color: #8b909c; margin-top: 2px; }
.war-f-hp {
  margin-top: 5px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden;
}
.war-f-hp > i {
  display: block; height: 100%; width: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--clan-mint), var(--clan-gold));
  transition: width .35s ease;
}
.war-fighter.defeated .war-f-hp > i { background: #555; width: 0 !important; }
.war-list-empty {
  padding: 28px 8px; text-align: center; font-size: 12px; color: #8b909c; font-weight: 700;
}
.war-draft-preview { display: grid; gap: 6px; margin: 10px 0 12px; }
.war-draft-chip {
  display: flex; justify-content: space-between; gap: 8px; padding: 9px 11px;
  border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  font-size: 12px; font-weight: 700; animation: clanRise .3s ease both;
}
.war-roster-modal { width: min(92vw, 420px); max-height: 84vh; }
.custom-confirm-modal.war-roster-modal {
  box-sizing: border-box; overflow: hidden; padding: 18px; border-radius: 22px;
  background: #151821; border: 1px solid var(--clan-line);
  box-shadow: 0 24px 70px rgba(0,0,0,.75);
}
.war-roster-modal .cc-title {
  font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 7px;
}
.war-roster-modal .cc-text { color: #9aa1b0; font-size: 12px; line-height: 1.45; }
.war-roster-modal .cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.war-roster-modal .cc-btn {
  min-height: 42px; padding: 9px; border-radius: 12px; font: 700 12px/1.2 inherit;
  background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.08);
}
.war-roster-modal .cc-btn.confirm {
  background: linear-gradient(135deg, #f0d59a, var(--clan-gold-deep)); color: #15110a; border: 0;
}
.war-roster-list { max-height: 48vh; overflow: auto; margin: 14px 0; display: grid; gap: 7px; }
.war-roster-row {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 10px;
  border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid transparent;
  font-size: 12px; cursor: pointer; transition: border-color .15s, background .15s;
}
.war-roster-row:has(input:checked) {
  border-color: rgba(232,196,120,.4); background: rgba(232,196,120,.08);
}
.war-roster-row input { accent-color: var(--clan-gold); width: 16px; height: 16px; }
.war-roster-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.war-roster-row b { font-size: 9px; color: var(--clan-gold); }

/* More */
.clan-more-grid { display: grid; gap: 10px; }
.clan-more-card {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center;
  text-align: left; border-radius: 18px; padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.06); color: inherit; cursor: pointer;
  animation: clanRise .35s ease both;
  animation-delay: calc(var(--d, 0) * .07s);
  transition: border-color .2s, transform .16s;
}
.clan-more-card:hover { border-color: rgba(232,196,120,.3); }
.clan-more-card:active { transform: scale(.98); }
.clan-more-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 18px; font-weight: 900; color: var(--clan-gold);
  background: rgba(232,196,120,.1); border: 1px solid rgba(232,196,120,.18);
}
.clan-more-name { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.clan-more-desc { font-size: 12px; color: #8b909c; font-weight: 600; }
.clan-more-arrow { font-size: 22px; color: #6f7584; font-weight: 300; }

@media (max-width: 380px) {
  .clan-subnav { gap: 3px; padding: 4px; }
  .clan-tab-btn { font-size: 9px; padding: 8px 1px; }
  .clan-home-name { font-size: 20px; }
  .clan-kpi-val { font-size: 14px; }
  .war-lists { gap: 6px; }
}

/* Trade */
.clan-trade-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.trade-panel { display: none; }
.trade-panel.active { display: block; }
.clan-trade-list { display: flex; flex-direction: column; gap: 12px; }

/* Stats Bento */
.stats-bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-tile {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.06); border-radius: 16px; padding: 16px;
  animation: clanRise .35s ease both;
}
.stat-label { font-size: 10px; color: #8b909c; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: #fff; }
.accent-tile { background: rgba(232,196,120,.06); border-color: rgba(232,196,120,.22); }

/* Chat Messages */
.clan-chat-msg { display: flex; flex-direction: column; margin-bottom: 4px; animation: clanRise .25s ease; }
.msg-author { font-size: 10px; font-weight: 800; color: #8b909c; margin-bottom: 2px; margin-left: 12px; }
.msg-bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 16px;
  position: relative; display: inline-flex; flex-direction: column;
}
.msg-text { font-size: 13px; color: #fff; word-break: break-word; line-height: 1.4; }
.msg-time { font-size: 9px; color: rgba(255,255,255,.45); text-align: right; margin-top: 4px; }
.msg-me { align-items: flex-end; }
.msg-me .msg-bubble {
  background: linear-gradient(135deg, var(--clan-gold) 0%, var(--clan-gold-deep) 100%);
  border-bottom-right-radius: 4px;
}
.msg-me .msg-text { color: #1a1408; font-weight: 600; }
.msg-me .msg-time { color: rgba(26,20,8,.55); font-weight: 700; }
.msg-other { align-items: flex-start; }
.msg-other .msg-bubble {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.05);
  border-bottom-left-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════
   VIP CASINO THEME
══════════════════════════════════════════════════════════════ */
:root {
  --gold:        #C9A84C;
  --gold-light:  #F5D78A;
  --gold-dark:   #8A6820;
  --gold-dim:    rgba(201,168,76,0.15);
  --gold-border: rgba(201,168,76,0.35);
  --felt:        #0B2D1A;
  --felt-mid:    #0D3820;
  --felt-light:  #114828;
}

/* ── Casino Lobby Header ──────────────────────────────── */
.casino-lobby-header {
  padding: 20px 0 16px;
  text-align: center;
  position: relative;
}
.casino-lobby-title {
  font-size: 15px; font-weight: 900; letter-spacing: .22em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.clh-diamond {
  font-size: 9px; opacity: .7;
  -webkit-text-fill-color: var(--gold);
}
.casino-bal-row {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--gold-border);
  border-radius: 20px; padding: 0 20px;
  backdrop-filter: blur(12px);
  width: fit-content; margin: 0 auto;
  box-shadow: 0 0 24px rgba(201,168,76,0.08), inset 0 1px 0 rgba(201,168,76,0.12);
}
.casino-bal-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px;
}
.cbc-icon {
  font-size: 14px; color: var(--gold); line-height: 1;
}
.cbc-val {
  font-size: 18px; font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff; letter-spacing: -.3px;
}
.cbc-lbl {
  font-size: 9px; font-weight: 800; color: var(--gold);
  letter-spacing: .12em; text-transform: uppercase; opacity: .7;
}
.casino-bal-sep {
  width: 1px; height: 28px;
  background: var(--gold-border);
}

/* ── VIP Game Picker Grid ─────────────────────────────── */
.vip-games-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 4px;
}
.vip-game-card {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 18px 12px 14px;
  cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(145deg, rgba(20,20,24,0.98) 0%, rgba(14,14,18,0.96) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1),
              border-color .18s, box-shadow .18s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; min-height: 112px; justify-content: center;
}
.vip-game-card:active { transform: scale(.94); }
.vip-game-card.game-pick-active {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 1px var(--gold-border),
              0 8px 28px rgba(201,168,76,0.18),
              inset 0 0 40px rgba(201,168,76,0.04);
}
.vgc-glow {
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.14) 0%, transparent 65%);
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.vip-game-card.game-pick-active .vgc-glow { opacity: 1; }
.vgc-art {
  color: rgba(255,255,255,0.35);
  transition: color .18s;
  line-height: 1;
}
.vip-game-card.game-pick-active .vgc-art { color: var(--gold); }
.vgc-name {
  font-size: 12px; font-weight: 900; letter-spacing: .1em;
  color: var(--text); text-transform: uppercase;
}
.vgc-sub {
  font-size: 10px; font-weight: 700; color: var(--text-sub);
  letter-spacing: .06em;
}
.vip-game-card.game-pick-active .vgc-sub { color: var(--gold); }
.vgc-line {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 2px; width: 0%; border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width .25s ease;
}
.vip-game-card.game-pick-active .vgc-line { width: 60%; }

/* Per-card accent colors (inactive) */
.vgc-dice  { --card-accent: rgba(251,191,36,0.08); }
.vgc-slots { --card-accent: rgba(251,191,36,0.08); }
.vgc-bj    { --card-accent: rgba(74,222,128,0.06); }
.vgc-guess { --card-accent: rgba(147,197,253,0.06); }

/* ── Casino Panel Header ──────────────────────────────── */
.casino-panel-header {
  font-size: 11px; font-weight: 900; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
  padding: 6px 2px 10px;
  border-bottom: 1px solid var(--gold-border);
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.cph-suit {
  font-size: 14px; opacity: .8;
}

/* ── Casino Card ──────────────────────────────────────── */
.casino-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative; overflow: hidden;
}
.casino-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

/* ── Casino Input Row ─────────────────────────────────── */
.casino-input-row {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--gold-border) !important;
  border-radius: 14px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 0 12px rgba(201,168,76,0.05);
}

/* ── Casino Quick Bets ────────────────────────────────── */
.casino-quick-bets .cqb {
  background: rgba(201,168,76,0.06);
  border-color: rgba(201,168,76,0.2) !important;
  color: var(--gold-light);
  font-weight: 800;
  transition: background .15s, border-color .15s, transform .1s;
}
.casino-quick-bets .cqb:hover {
  background: rgba(201,168,76,0.14);
  border-color: var(--gold-border) !important;
}
.casino-quick-bets .qb-max {
  background: rgba(201,168,76,0.14) !important;
  border-color: rgba(201,168,76,0.4) !important;
  color: var(--gold) !important;
}

/* ── Casino Cooldown Card ─────────────────────────────── */
.casino-cd-card {
  background: rgba(0,0,0,0.5);
  border-color: var(--gold-border) !important;
}
.casino-cd-card .cd-label {
  color: var(--gold) !important; opacity: .7;
}

/* ── Casino Main Action Buttons ───────────────────────── */
.casino-main-btn {
  width: 100%; border: none; border-radius: 18px;
  padding: 19px; font-weight: 900; font-size: 14px;
  letter-spacing: .2em; text-transform: uppercase;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .15s, filter .15s, opacity .2s;
  font-family: inherit;
}
.casino-main-btn::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
}
.casino-main-btn:hover::before { left: 160%; }
.casino-main-btn:active { transform: scale(.97); filter: brightness(1.1); }
.casino-main-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.casino-btn-dice {
  background: linear-gradient(135deg, #92490a 0%, #b85c0e 50%, #7a3b08 100%);
  color: #fde8c8;
  box-shadow: 0 6px 24px rgba(184,92,14,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.casino-btn-slots {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: #1a0f00;
  box-shadow: 0 6px 24px rgba(201,168,76,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.casino-btn-bj {
  background: linear-gradient(135deg, #0f4a2a 0%, #186438 50%, #0d3d22 100%);
  color: var(--gold-light);
  box-shadow: 0 6px 24px rgba(15,74,42,0.5), inset 0 1px 0 rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.25);
}
.casino-btn-guess {
  background: linear-gradient(135deg, #1a1a6e 0%, #2828a8 50%, #141460 100%);
  color: #c7d2fe;
  box-shadow: 0 6px 24px rgba(40,40,168,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ══════════════════════════════════════════════════════════════
   BLACKJACK CASINO TABLE
══════════════════════════════════════════════════════════════ */

/* ── Preview Felt (Start Panel) ───────────────────────── */
.bj-preview-felt {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, var(--felt-light) 0%, var(--felt-mid) 50%, var(--felt) 100%);
  border-radius: 18px 18px 0 0;
  padding: 28px 20px 24px;
  text-align: center;
  border-bottom: 2px solid rgba(201,168,76,0.3);
}
.bj-preview-felt::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 8px,
    rgba(0,0,0,0.04) 8px, rgba(0,0,0,0.04) 9px
  );
  pointer-events: none;
}
.bj-preview-arc {
  position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%);
  width: 240%; height: 120px;
  border: 2px solid rgba(201,168,76,0.2);
  border-radius: 50%;
  pointer-events: none;
}
.bj-preview-logo { position: relative; z-index: 1; }
.bj-preview-suits {
  font-size: 18px; letter-spacing: 8px; color: rgba(201,168,76,0.6);
  margin-bottom: 8px;
}
.bj-preview-title {
  font-size: 24px; font-weight: 900; letter-spacing: .3em;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
}
.bj-preview-sub {
  font-size: 10px; font-weight: 700; letter-spacing: .2em;
  color: rgba(201,168,76,0.55); text-transform: uppercase; margin-top: 4px;
}
.bj-rules-chips-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; margin-top: 16px;
  position: relative; z-index: 1;
}
.bj-rule-chip {
  font-size: 9px; font-weight: 800; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}
.bj-chip-gold {
  background: rgba(201,168,76,0.18) !important;
  border-color: rgba(201,168,76,0.45) !important;
  color: var(--gold) !important;
}

/* ── Chip Betting Panel ───────────────────────────────── */
.bj-chip-betting {
  padding: 20px 16px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bj-chip-title {
  font-size: 10px; font-weight: 800; letter-spacing: .16em;
  color: var(--gold); text-transform: uppercase;
  margin-bottom: 14px; text-align: center;
}
.casino-chips-row {
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.casino-chip-btn {
  width: 52px; height: 52px; border-radius: 50%;
  font-size: 10px; font-weight: 900; letter-spacing: .04em;
  cursor: pointer; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
  border: 3px solid transparent;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.casino-chip-btn::after {
  content: ''; position: absolute; inset: 4px;
  border-radius: 50%; border: 1px dashed rgba(255,255,255,0.25);
  pointer-events: none;
}
.casino-chip-btn:active { transform: scale(.9); }
.casino-chip-btn:hover  { transform: translateY(-2px) scale(1.06); }

.chip-v25  { background: radial-gradient(circle, #4a4a4a 0%, #2a2a2a 100%); color: #ddd; border-color: #666; }
.chip-v100 { background: radial-gradient(circle, #2563eb 0%, #1d4ed8 100%); color: #bfdbfe; border-color: #3b82f6; }
.chip-v500 { background: radial-gradient(circle, #16a34a 0%, #15803d 100%); color: #bbf7d0; border-color: #22c55e; }
.chip-v1k  { background: radial-gradient(circle, #c9a84c 0%, #8a6820 100%); color: #1a0f00; border-color: var(--gold-light); }
.chip-v5k  { background: radial-gradient(circle, #7c3aed 0%, #6d28d9 100%); color: #ede9fe; border-color: #a78bfa; }
.chip-vmax { background: radial-gradient(circle, #dc2626 0%, #b91c1c 100%); color: #fee2e2; border-color: #f87171; }

.bj-manual-bet {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  overflow: hidden;
}

/* ── Active Casino Felt Table ─────────────────────────── */
.bj-casino-table {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 20%, var(--felt-light) 0%, var(--felt-mid) 40%, var(--felt) 100%);
  padding: 20px 16px 16px;
  min-height: 240px;
}
.bj-casino-table::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    rgba(0,0,0,0.035) 10px, rgba(0,0,0,0.035) 11px
  );
  pointer-events: none;
}
.bj-table-arc-outer {
  position: absolute; left: 50%; bottom: -80px;
  transform: translateX(-50%);
  width: 200%; height: 200px;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 50%;
  pointer-events: none;
}
.bj-table-arc-inner {
  position: absolute; left: 50%; bottom: -100px;
  transform: translateX(-50%);
  width: 160%; height: 160px;
  border: 1px solid rgba(201,168,76,0.1);
  border-radius: 50%;
  pointer-events: none;
}

/* Zones */
.bj-dealer-zone {
  position: relative; z-index: 1; margin-bottom: 12px;
}
.bj-player-zone {
  position: relative; z-index: 1;
}
.bj-zone-tag {
  font-size: 10px; font-weight: 900; letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.75);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 10px;
}
.bj-zone-tag-player { color: rgba(74,222,128,0.8); }
.bj-zone-pip { font-size: 12px; }
.bj-zone-header-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 10px;
}
.bj-score-pill {
  font-size: 14px; font-weight: 900;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 20px; padding: 4px 14px;
  color: var(--gold-light);
  backdrop-filter: blur(4px);
}
.bj-table-rule {
  position: relative; text-align: center;
  margin: 14px 0;
  border-top: 1px solid rgba(201,168,76,0.2);
}
.bj-rule-text {
  position: absolute; top: -9px; left: 50%;
  transform: translateX(-50%);
  background: var(--felt-mid);
  padding: 0 10px;
  font-size: 8px; font-weight: 800; letter-spacing: .18em;
  color: rgba(201,168,76,0.5); text-transform: uppercase;
  white-space: nowrap;
}

/* Cards row */
.bj-cards-row {
  display: flex; flex-wrap: wrap; gap: 8px; min-height: 64px;
  align-items: flex-start;
}
.bj-card {
  width: 44px; height: 64px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6),
              inset 0 1px 0 rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.2);
  animation: card-deal .22s cubic-bezier(.34,1.56,.64,1) both;
  flex-shrink: 0;
}
@keyframes card-deal {
  from { transform: translateY(-18px) scale(0.8) rotate(-8deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.bj-card-back {
  width: 44px; height: 64px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  background: linear-gradient(135deg, #1a3d6b 0%, #0f2447 100%);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  animation: card-deal .22s cubic-bezier(.34,1.56,.64,1) both;
  flex-shrink: 0;
  position: relative; overflow: hidden;
}
.bj-card-back::before {
  content: ''; position: absolute; inset: 4px;
  background: repeating-linear-gradient(
    45deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 2px,
    transparent 2px, transparent 6px
  );
  border-radius: 3px;
}
.bj-card-back::after {
  content: '◆'; position: absolute;
  font-size: 14px; color: rgba(255,255,255,0.15);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}

/* ── Blackjack Action Bar ─────────────────────────────── */
.bj-action-bar {
  display: flex; gap: 0;
  background: #0a0a0c;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bj-act-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 14px 6px;
  border: none; background: transparent;
  cursor: pointer; font-family: inherit;
  position: relative; overflow: hidden;
  transition: background .15s;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.bj-act-btn:last-child { border-right: none; }
.bj-act-btn:active { background: rgba(255,255,255,0.06); }
.bja-icon {
  font-size: 17px; font-weight: 900; line-height: 1;
}
.bja-label {
  font-size: 9px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase;
}

.bj-act-hit {
  background: rgba(34,197,94,0.08);
  border-right-color: rgba(34,197,94,0.15) !important;
}
.bj-act-hit .bja-icon,
.bj-act-hit .bja-label { color: #4ade80; }
.bj-act-hit:active { background: rgba(34,197,94,0.18); }

.bj-act-stand {
  background: rgba(239,68,68,0.08);
  border-right-color: rgba(239,68,68,0.15) !important;
}
.bj-act-stand .bja-icon,
.bj-act-stand .bja-label { color: #f87171; }
.bj-act-stand:active { background: rgba(239,68,68,0.18); }

.bj-act-double {
  background: rgba(201,168,76,0.07);
}
.bj-act-double .bja-icon,
.bj-act-double .bja-label { color: var(--gold); }
.bj-act-double:active { background: rgba(201,168,76,0.15); }

.bj-act-split {
  background: rgba(147,197,253,0.06);
}
.bj-act-split .bja-icon,
.bj-act-split .bja-label { color: #93c5fd; }

.bj-act-surr {
  background: rgba(156,163,175,0.05);
}
.bj-act-surr .bja-icon,
.bj-act-surr .bja-label { color: rgba(255,255,255,0.4); }

.bj-act-inactive .bja-icon,
.bj-act-inactive .bja-label {
  opacity: .38;
}

/* Active hit/stand on disabled state */
.bj-act-btn:disabled {
  opacity: .35; cursor: not-allowed;
}

/* ── Guess Casino Style ───────────────────────────────── */
.casino-guess-stage {
  background: linear-gradient(135deg, rgba(20,20,24,0.98) 0%, rgba(14,14,18,0.96) 100%);
  border: 1px solid var(--gold-border);
  box-shadow: inset 0 0 40px rgba(201,168,76,0.04), 0 0 24px rgba(201,168,76,0.06);
}
.casino-guess-btn {
  background: rgba(201,168,76,0.07) !important;
  border: 1.5px solid rgba(201,168,76,0.2) !important;
  color: var(--gold-light) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  border-radius: 12px; padding: 12px 0;
  transition: background .15s, border-color .15s, transform .1s;
}
.casino-guess-btn:active { transform: scale(.93); }
.casino-guess-btn.active {
  background: rgba(201,168,76,0.2) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 12px rgba(201,168,76,0.25) !important;
}

/* ══════════════════════════════════════════════════════════════
   GAME CARD COLOR THEMES — per-game vivid backgrounds
══════════════════════════════════════════════════════════════ */

/* Base card size & layout fix */
.vip-game-card {
  min-height: 148px !important;
  justify-content: center !important;
  gap: 10px !important;
}

/* DICE – fiery orange */
.vgc-dice {
  background: linear-gradient(155deg, #3d1a06 0%, #6b2e0d 55%, #280f02 100%) !important;
  border-color: rgba(251,146,60,0.45) !important;
  box-shadow: 0 4px 28px rgba(251,146,60,0.18), inset 0 0 40px rgba(251,146,60,0.06) !important;
}
.vgc-dice.game-pick-active {
  border-color: #fb923c !important;
  box-shadow: 0 0 0 1.5px #fb923c, 0 8px 36px rgba(251,146,60,0.45) !important;
}
.vgc-dice .vgc-glow {
  opacity: 1 !important;
  background: radial-gradient(ellipse at 50% -5%, rgba(251,146,60,.32) 0%, transparent 65%) !important;
}
.vgc-dice .vgc-art  { color: #fb923c !important; filter: drop-shadow(0 0 16px rgba(251,146,60,.9)); }
.vgc-dice .vgc-name { color: #fed7aa !important; }
.vgc-dice .vgc-sub  { color: #fb923c !important; }
.vgc-dice .vgc-line { background: linear-gradient(90deg, transparent, #fb923c, transparent) !important; }

/* SLOTS – golden amber */
.vgc-slots {
  background: linear-gradient(155deg, #3a2d00 0%, #665000 55%, #261e00 100%) !important;
  border-color: rgba(251,191,36,0.45) !important;
  box-shadow: 0 4px 28px rgba(251,191,36,0.18), inset 0 0 40px rgba(251,191,36,0.06) !important;
}
.vgc-slots.game-pick-active {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 1.5px #fbbf24, 0 8px 36px rgba(251,191,36,0.45) !important;
}
.vgc-slots .vgc-glow {
  opacity: 1 !important;
  background: radial-gradient(ellipse at 50% -5%, rgba(251,191,36,.3) 0%, transparent 65%) !important;
}
.vgc-slots .vgc-art  { color: #fbbf24 !important; filter: drop-shadow(0 0 16px rgba(251,191,36,.9)); }
.vgc-slots .vgc-name { color: #fef3c7 !important; }
.vgc-slots .vgc-sub  { color: #fbbf24 !important; }
.vgc-slots .vgc-line { background: linear-gradient(90deg, transparent, #fbbf24, transparent) !important; }

/* BLACKJACK – casino green */
.vgc-bj {
  background: linear-gradient(155deg, #002b14 0%, #00471f 55%, #001b0d 100%) !important;
  border-color: rgba(34,197,94,0.45) !important;
  box-shadow: 0 4px 28px rgba(34,197,94,0.15), inset 0 0 40px rgba(34,197,94,0.05) !important;
}
.vgc-bj.game-pick-active {
  border-color: #4ade80 !important;
  box-shadow: 0 0 0 1.5px #4ade80, 0 8px 36px rgba(74,222,128,0.4) !important;
}
.vgc-bj .vgc-glow {
  opacity: 1 !important;
  background: radial-gradient(ellipse at 50% -5%, rgba(34,197,94,.26) 0%, transparent 65%) !important;
}
.vgc-bj .vgc-art  { color: #4ade80 !important; filter: drop-shadow(0 0 16px rgba(74,222,128,.8)); }
.vgc-bj .vgc-name { color: #dcfce7 !important; }
.vgc-bj .vgc-sub  { color: #4ade80 !important; }
.vgc-bj .vgc-line { background: linear-gradient(90deg, transparent, #4ade80, transparent) !important; }

/* GUESS – deep indigo */
.vgc-guess {
  background: linear-gradient(155deg, #0c0e3d 0%, #161a62 55%, #070926 100%) !important;
  border-color: rgba(129,140,248,0.45) !important;
  box-shadow: 0 4px 28px rgba(129,140,248,0.18), inset 0 0 40px rgba(129,140,248,0.05) !important;
}
.vgc-guess.game-pick-active {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 1.5px #818cf8, 0 8px 36px rgba(129,140,248,0.4) !important;
}
.vgc-guess .vgc-glow {
  opacity: 1 !important;
  background: radial-gradient(ellipse at 50% -5%, rgba(129,140,248,.28) 0%, transparent 65%) !important;
}
.vgc-guess .vgc-art  { color: #818cf8 !important; filter: drop-shadow(0 0 16px rgba(129,140,248,.9)); }
.vgc-guess .vgc-name { color: #e0e7ff !important; }
.vgc-guess .vgc-sub  { color: #818cf8 !important; }
.vgc-guess .vgc-line { background: linear-gradient(90deg, transparent, #818cf8, transparent) !important; }

/* Bigger SVG art */
.vgc-art svg { width: 54px !important; height: 54px !important; }

/* Diagonal texture overlay on each card */
.vip-game-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: repeating-linear-gradient(
    135deg, transparent, transparent 12px,
    rgba(255,255,255,0.018) 12px, rgba(255,255,255,0.018) 13px
  );
  pointer-events: none; z-index: 0;
}
.vgc-glow, .vgc-art, .vgc-name, .vgc-sub, .vgc-line { position: relative; z-index: 1; }

/* ── Casino Lobby Header – make it pop ─────────────────── */
.casino-lobby-header { padding: 24px 0 20px !important; }
.casino-lobby-title  { font-size: 17px !important; letter-spacing: .28em !important; }
.casino-bal-row {
  box-shadow: 0 0 32px rgba(201,168,76,0.14),
              inset 0 1px 0 rgba(201,168,76,0.18) !important;
}
.cbc-val { font-size: 20px !important; }

/* ── Casino Panel Header – colored per section ─────────── */
.casino-btn-dice::before,
.casino-btn-slots::before,
.casino-btn-bj::before,
.casino-btn-guess::before { content: ''; }

/* Game result card – gold top accent */
.game-result-card {
  background: rgba(12,12,16,0.96) !important;
  border-color: rgba(201,168,76,0.2) !important;
}
.game-result-card::before {
  background: linear-gradient(90deg, transparent, var(--gold), transparent) !important;
  opacity: .5 !important;
}

/* ══════════════════════════════════════════════════════════════
   🎡  ROULETTE  –  Executive Casino Suite
══════════════════════════════════════════════════════════════ */

/* ── Picker card theme (mahogany gold) ────────────────────── */
.vgc-rl {
  background: linear-gradient(135deg, #1a0808 0%, #2a1008 55%, #0f0604 100%) !important;
  border-color: rgba(201,168,76,.45) !important;
  box-shadow: 0 4px 28px rgba(201,168,76,.15), inset 0 0 40px rgba(201,168,76,.04) !important;
}
.vgc-rl.game-pick-active {
  border-color: #c9a84c !important;
  box-shadow: 0 0 0 1.5px #c9a84c, 0 8px 30px rgba(201,168,76,.35) !important;
}
.vgc-rl .vgc-glow {
  opacity: 1 !important;
  background: radial-gradient(ellipse at 20% 50%, rgba(201,168,76,.2) 0%, transparent 65%) !important;
}
.vgc-rl .vgc-art  { color: #d4a847 !important; filter: drop-shadow(0 0 10px rgba(212,168,71,.6)); }
.vgc-rl .vgc-name { color: #fef3c7 !important; }
.vgc-rl .vgc-sub  { color: #d4a847 !important; }

.vgc-new-badge {
  position: relative; z-index: 2;
  background: linear-gradient(135deg, #8b6914, #c9a84c);
  color: #1a0808; font-size: 9px; font-weight: 900;
  letter-spacing: .12em; padding: 3px 7px;
  border-radius: 20px; align-self: center;
  box-shadow: 0 0 8px rgba(201,168,76,.5);
  animation: rl-badge-pulse 3s ease-in-out infinite;
}
@keyframes rl-badge-pulse {
  0%,100% { box-shadow: 0 0 8px rgba(201,168,76,.5); }
  50%      { box-shadow: 0 0 14px rgba(201,168,76,.75); }
}

/* ── Wheel section ───────────────────────────────────────── */
.rl-wheel-section {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 14px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(201,168,76,.05) 0%, transparent 60%),
    linear-gradient(180deg, #0d0604 0%, #0a0503 50%, #080402 100%);
  border-bottom: 1px solid rgba(201,168,76,.15);
}
.rl-wheel-container {
  position: relative;
  width:  min(88vw, 360px);
  height: min(88vw, 360px);
}
.rl-wheel {
  width: 100%; height: 100%;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px #2a1a08,
    0 0 0 7px rgba(201,168,76,.5),
    0 0 0 9px #1a0e04,
    0 8px 40px rgba(0,0,0,.8),
    0 0 60px rgba(201,168,76,.15);
  will-change: transform;
  cursor: default;
  overflow: visible;
}
.rl-pointer {
  position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  color: #c9a84c; font-size: 22px; line-height: 1;
  text-shadow: 0 2px 6px rgba(0,0,0,.9), 0 0 10px rgba(201,168,76,.6);
  z-index: 10; pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(201,168,76,.4));
}
.rl-center-badge {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 62px; height: 62px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #1a0e04 0%, #080402 100%);
  border: 2px solid rgba(201,168,76,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 6; pointer-events: none;
  box-shadow: inset 0 0 16px rgba(0,0,0,.9), 0 0 20px rgba(201,168,76,.25);
}
.rl-win-num {
  font-size: 20px; font-weight: 900; color: #fef3c7;
  text-shadow: 0 0 8px rgba(201,168,76,.6);
  font-family: 'Georgia', serif;
}
.rl-win-num.rl-col-red   { color: #fca5a5; text-shadow: 0 0 8px rgba(248,113,113,.5); }
.rl-win-num.rl-col-black { color: #e2e8f0; text-shadow: 0 0 6px rgba(226,232,240,.3); }
.rl-win-num.rl-col-green { color: #86efac; text-shadow: 0 0 8px rgba(74,222,128,.5); }

/* ── Spin stats row ──────────────────────────────────────── */
.rl-spin-stats {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 340px; margin-top: 16px; gap: 10px;
  padding: 0 8px;
}
.rl-stat-box {
  flex: 1;
  background: rgba(201,168,76,.04);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: 10px; padding: 8px 12px;
}
.rl-stat-lbl {
  font-size: 8px; font-weight: 700; letter-spacing: .14em;
  color: rgba(201,168,76,.6); text-transform: uppercase;
}
.rl-stat-val {
  font-size: 16px; font-weight: 900; color: #fef3c7;
  margin-top: 2px; font-family: 'Georgia', serif;
}
.rl-spin-big-btn {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #c9a84c 0%, #8b6914 50%, #6d5011 100%);
  color: #1a0808; border: none; border-radius: 50px;
  font-size: 13px; font-weight: 900; letter-spacing: .16em;
  padding: 14px 28px; cursor: pointer;
  box-shadow:
    0 2px 0 #5c3a00,
    0 4px 16px rgba(201,168,76,.4),
    inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .12s, box-shadow .12s;
  text-shadow: 0 1px 0 rgba(255,255,255,.2);
}
.rl-spin-big-btn:active {
  transform: scale(.94) translateY(1px);
  box-shadow: 0 1px 0 #5c3a00, 0 2px 8px rgba(201,168,76,.3);
}
.rl-spin-big-btn:disabled { opacity: .35; filter: saturate(.5); }

/* ── Chip selector ───────────────────────────────────────── */
.rl-chips-section {
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, #0a0503, #0c0604);
  border-bottom: 1px solid rgba(201,168,76,.1);
}
.rl-chips-label {
  font-size: 9px; font-weight: 700; letter-spacing: .16em;
  color: rgba(201,168,76,.5); margin-bottom: 10px;
}
.rl-chips-bar {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 6px; justify-content: center;
}
.rl-chips-bar::-webkit-scrollbar { display: none; }
.rl-chip {
  flex: 0 0 auto;
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid; font-size: 11px; font-weight: 900;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
  position: relative;
  box-shadow: 0 3px 8px rgba(0,0,0,.6), inset 0 2px 4px rgba(255,255,255,.1);
}
.rl-chip::before {
  content: ''; position: absolute; inset: 5px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.2);
}
.rl-chip::after {
  content: ''; position: absolute; inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.08), transparent 60%);
}
.rl-chip:active  { transform: scale(.88); }
.rl-chip-sel {
  transform: scale(1.22) translateY(-3px) !important;
  box-shadow: 0 0 0 2.5px #c9a84c, 0 6px 24px rgba(201,168,76,.5), 0 0 12px rgba(201,168,76,.3) !important;
}

/* ── Betting table ───────────────────────────────────────── */
.rl-table-outer {
  overflow-x: auto; padding: 14px 0;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 36px, rgba(201,168,76,.03) 36px, rgba(201,168,76,.03) 37px),
    linear-gradient(180deg, #0b2818 0%, #082213 50%, #061a0e 100%);
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid rgba(201,168,76,.12);
  border-bottom: 1px solid rgba(201,168,76,.12);
}
.rl-table-outer::-webkit-scrollbar { height: 3px; }
.rl-table-outer::-webkit-scrollbar-track { background: rgba(0,0,0,.3); }
.rl-table-outer::-webkit-scrollbar-thumb { background: rgba(201,168,76,.4); border-radius: 2px; }

.rl-table {
  min-width: 530px; padding: 0 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.rl-tbl-row { display: flex; gap: 2px; }

/* Number cells */
.rl-num-cell {
  width: 38px; height: 38px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; cursor: pointer;
  position: relative; transition: transform .1s, filter .15s;
  border: 1px solid rgba(201,168,76,.2);
  user-select: none;
  font-family: 'Georgia', serif;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.rl-num-cell:active { transform: scale(.88); filter: brightness(1.3); }
.rl-num-cell.rl-red {
  background: linear-gradient(145deg, #8b2020, #6b1515);
  color: #fef2f2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.rl-num-cell.rl-black {
  background: linear-gradient(145deg, #1a1a28, #0f0f1a);
  color: #f1f5f9;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.rl-num-cell.rl-zero {
  background: linear-gradient(145deg, #166534, #0f4a22);
  color: #bbf7d0;
}
.rl-num-cell.rl-won {
  outline: 2.5px solid #c9a84c;
  box-shadow: 0 0 12px rgba(201,168,76,.5);
}

/* Zero cell */
.rl-zero-cell {
  width: 38px; border-radius: 4px;
  background: linear-gradient(180deg, #166534, #0f4a22);
  color: #bbf7d0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; cursor: pointer;
  border: 1.5px solid rgba(201,168,76,.4);
  transition: transform .1s; user-select: none;
  font-family: 'Georgia', serif;
  text-shadow: 0 0 6px rgba(74,222,128,.4);
  box-shadow: inset 0 0 10px rgba(0,0,0,.3);
}
.rl-zero-cell:active { transform: scale(.88); }

/* Column 2:1 buttons */
.rl-col-btn {
  width: 38px; height: 38px; border-radius: 4px;
  background: linear-gradient(145deg, rgba(201,168,76,.12), rgba(201,168,76,.06));
  border: 1px solid rgba(201,168,76,.35);
  color: #c9a84c; font-size: 10px; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .1s;
  letter-spacing: .05em;
}
.rl-col-btn:active { transform: scale(.88); }

/* Dozen / outside bet cells */
.rl-dozen-btn, .rl-out-btn {
  height: 34px; border-radius: 4px;
  background: rgba(201,168,76,.05);
  border: 1px solid rgba(201,168,76,.2);
  color: #fef3c7; font-size: 10px; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .1s, background .15s;
  user-select: none; letter-spacing: .06em;
}
.rl-dozen-btn:active, .rl-out-btn:active { transform: scale(.94); background: rgba(201,168,76,.12); }
.rl-out-btn.rl-red {
  background: linear-gradient(145deg, rgba(139,29,29,.6), rgba(100,20,20,.4));
  border-color: rgba(201,168,76,.25); color: #fecaca;
}
.rl-out-btn.rl-black {
  background: linear-gradient(145deg, rgba(15,15,26,.8), rgba(10,10,18,.6));
  border-color: rgba(201,168,76,.2); color: #f1f5f9;
}

/* Chip marker on cell */
.rl-chip-marker {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(145deg, #c9a84c, #8b6914);
  color: #1a0808; font-size: 7px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.7); z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  animation: rl-chip-pop .2s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
@keyframes rl-chip-pop {
  0%   { transform: scale(0) rotate(-20deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ── Action bar ──────────────────────────────────────────── */
.rl-actions-bar {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 10px; padding: 14px 16px;
  background: linear-gradient(180deg, #0a0503, #080402);
  border-top: 1px solid rgba(201,168,76,.12);
}
.rl-act-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 12px 8px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(201,168,76,.08), rgba(201,168,76,.03));
  border: 1px solid rgba(201,168,76,.2);
  color: #c9a84c; cursor: pointer;
  transition: transform .12s, background .15s, box-shadow .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.rl-act-btn > span { font-size: 18px; line-height: 1; }
.rl-act-btn > small { font-size: 8px; font-weight: 800; letter-spacing: .1em; color: rgba(201,168,76,.8); }
.rl-act-btn:active {
  transform: scale(.92) translateY(1px);
  background: rgba(201,168,76,.15);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.rl-act-double {
  background: linear-gradient(180deg, rgba(201,168,76,.14), rgba(201,168,76,.06)) !important;
  border-color: rgba(201,168,76,.4) !important;
  color: #fbbf24 !important;
}
.rl-act-double > small { color: rgba(251,191,36,.8) !important; }
.rl-act-rebet {
  background: linear-gradient(180deg, rgba(74,222,128,.08), rgba(74,222,128,.03)) !important;
  border-color: rgba(74,222,128,.25) !important;
  color: #4ade80 !important;
}
.rl-act-rebet > small { color: rgba(74,222,128,.7) !important; }

/* ── History bar ─────────────────────────────────────────── */
.rl-history-wrap {
  padding: 12px 16px 18px;
  background: #080402;
}
.rl-history-label {
  font-size: 9px; font-weight: 700; letter-spacing: .16em;
  color: rgba(201,168,76,.4); margin-bottom: 10px;
}
.rl-history {
  display: flex; gap: 7px; overflow-x: auto;
}
.rl-history::-webkit-scrollbar { display: none; }
.rl-hist-num {
  flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(201,168,76,.2);
  font-family: 'Georgia', serif;
  animation: rl-chip-pop .2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,.4);
}
.rl-hist-num.rl-col-red {
  background: linear-gradient(145deg, #7f1d1d, #5a1515);
  color: #fecaca; border-color: rgba(201,168,76,.3);
}
.rl-hist-num.rl-col-black {
  background: linear-gradient(145deg, #1a1a28, #0f0f18);
  color: #e2e8f0; border-color: rgba(201,168,76,.2);
}
.rl-hist-num.rl-col-green {
  background: linear-gradient(145deg, #166534, #0f4a22);
  color: #bbf7d0; border-color: rgba(201,168,76,.4);
}

/* ══════════════════════════════════════════════════════════════
   ⚔️ ARENA V2 REDESIGN & 5-TAB NAVIGATION (WOW AESTHETICS)
══════════════════════════════════════════════════════════════ */

/* 5-Tab Navigation Bar & Central Arena Accent Button */
.bottom-nav.five-tab-nav {
  display: flex !important;
  justify-content: space-around !important;
  align-items: center !important;
  padding: 6px 12px !important;
  background: rgba(15, 15, 20, 0.95) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 26px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  height: auto !important;
  min-height: 64px !important;
}

.bottom-nav.five-tab-nav .nav-btn {
  display: flex !important;
  flex: 1 !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  height: 52px !important;
  gap: 3px !important;
  padding: 0 !important;
}

.bottom-nav.five-tab-nav .nav-label {
  display: block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  line-height: 1 !important;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.bottom-nav.five-tab-nav .nav-btn.active .nav-label {
  opacity: 1 !important;
  color: var(--accent, #ff4b4b) !important;
}

.arena-center-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 68px !important;
  width: 68px !important;
  height: 68px !important;
  transform: translateY(-12px) !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin: 0 !important;
  border: none !important;
}

.arena-center-ring {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  margin-bottom: 3px !important;
  background: linear-gradient(135deg, #ff2a55 0%, #ff6a00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(255, 42, 85, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.35);
  animation: arena-glow-pulse 3s ease-in-out infinite;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arena-center-btn:active .arena-center-ring {
  transform: scale(0.92);
}

.arena-center-btn.active .arena-center-ring {
  box-shadow: 0 12px 28px rgba(255, 42, 85, 0.8), 0 0 18px #ffcc00, inset 0 2px 0 rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.arena-label {
  display: block !important;
  color: #ff6a00 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-shadow: 0 2px 6px rgba(255, 106, 0, 0.4);
}

@keyframes arena-glow-pulse {
  0%, 100% { box-shadow: 0 10px 25px rgba(255, 42, 85, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 12px 35px rgba(255, 106, 0, 0.7), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
}

/* Arena Lobby Hero Banner & Active Alert */
.arena-hero-banner {
  position: relative;
  padding: 24px 20px;
  margin-bottom: 16px;
  border-radius: 28px;
  background: linear-gradient(135deg, #1f1424 0%, #150d1a 100%);
  border: 1px solid rgba(255, 42, 85, 0.25);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.arena-hero-bg-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 42, 85, 0.35) 0%, transparent 70%);
  filter: blur(25px);
  pointer-events: none;
}

.arena-hero-content {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.arena-tier-badge {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(145deg, #321d3a, #1d1222);
  border: 2px solid rgba(255, 204, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.1);
  animation: float-badge 3s ease-in-out infinite;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.arena-tier-details { flex: 1; }
.arena-league-title {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.arena-trophy-display {
  font-size: 14px;
  font-weight: 800;
  color: #ffcc00;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mmr-tag {
  font-size: 11px;
  color: #a0aec0;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
}
.arena-prog-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.arena-prog-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff2a55, #ffcc00);
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.arena-prog-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

/* Active Battle Resume Alert */
.arena-active-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.25), rgba(153, 27, 27, 0.15));
  border: 1px solid #ef4444;
  border-radius: 18px;
  margin-bottom: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
  transition: transform 0.2s;
}
.arena-active-banner:hover { transform: scale(1.02); }
.pulse-dot { font-size: 14px; animation: blink-dot 1s infinite; margin-right: 10px; }
@keyframes blink-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.active-banner-text { display: flex; flex-direction: column; font-size: 13px; color: #fff; flex: 1; }
.active-banner-text span { font-size: 11px; color: #fca5a5; }
.resume-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

/* Team Preview in Lobby */
.team-preview-header { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 13px; color: #cbd5e1; margin-bottom: 10px; }
.link-btn { background: none; border: none; color: #ffcc00; font-weight: 700; cursor: pointer; font-size: 12px; }
.team-preview-slots { display: flex; gap: 8px; justify-content: space-between; }
.mini-slot {
  flex: 1;
  height: 60px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 800;
}
.mini-slot.filled { border: 1px solid rgba(255, 255, 255, 0.2); background: #1e1e24; }
.mini-slot img, .mini-slot video, .mini-slot .mini-slot-img { width: 100% !important; height: 100% !important; object-fit: cover !important; position: absolute; top: 0; left: 0; display: block; }
.battle-card-unit img, .battle-card-unit video, .battle-card-img { width: 100% !important; height: 100% !important; object-fit: cover !important; position: absolute; top: 0; left: 0; display: block; z-index: 0; }
.battle-card-unit.arena-player-lunge {
  z-index: 60;
  animation: arena-player-lunge .5s cubic-bezier(.2,.8,.2,1);
}
.battle-card-unit.arena-enemy-lunge {
  z-index: 60;
  animation: arena-enemy-lunge .5s cubic-bezier(.2,.8,.2,1);
}
.battle-card-unit.arena-target-hit {
  animation: arena-target-hit .5s ease;
}
.arena-slash-projectile {
  position: fixed;
  z-index: 9999;
  width: 34px;
  height: 7px;
  margin: -4px 0 0 -17px;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(0, 0) rotate(-35deg);
  animation: arena-slash-flight .46s cubic-bezier(.15,.7,.25,1) forwards;
}
.arena-slash-projectile.player {
  background: #60a5fa;
  box-shadow: 0 0 8px #fff, 0 0 20px #3b82f6, 0 0 36px #2563eb;
}
.arena-slash-projectile.enemy {
  background: #fb7185;
  box-shadow: 0 0 8px #fff, 0 0 20px #ef4444, 0 0 36px #dc2626;
}
@keyframes arena-player-lunge {
  0%,100% { transform: translateY(0) scale(1); }
  42% { transform: translateY(-20px) scale(1.14) rotate(-4deg); }
}
@keyframes arena-enemy-lunge {
  0%,100% { transform: translateY(0) scale(1); }
  42% { transform: translateY(20px) scale(1.14) rotate(4deg); }
}
@keyframes arena-target-hit {
  0%,100% { transform: translateX(0); filter: brightness(1); }
  30% { transform: translateX(-7px) rotate(-3deg); filter: brightness(2) saturate(2); box-shadow: 0 0 28px #ef4444; }
  55% { transform: translateX(7px) rotate(3deg); }
  75% { transform: translateX(-3px); }
}
@keyframes arena-slash-flight {
  0% { opacity: 0; transform: translate(0,0) rotate(-35deg) scale(.3); }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--attack-x),var(--attack-y)) rotate(-35deg) scale(1.5); }
}
.lb-avatar img, .lb-avatar video, .lb-avatar-img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; }
.mini-slot .role-ico { position: absolute; bottom: 2px; right: 2px; font-size: 10px; background: rgba(0, 0, 0, 0.7); border-radius: 4px; padding: 1px 3px; z-index: 10; }

/* Pulse Glow Action CTA */
.pulse-glow-btn {
  width: 100%;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff2a55 0%, #ff7300 100%);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 42, 85, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.pulse-glow-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: shine-sweep 3.5s infinite;
}
@keyframes shine-sweep { 0%, 70% { left: -100%; } 100% { left: 200%; } }
.pulse-glow-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(255, 42, 85, 0.6); }
.pulse-glow-btn:active { transform: scale(0.96); }

/* Radar Loading Animation */
.arena-radar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #ff2a55;
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 42, 85, 0.4);
}
.arena-radar::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 150%; height: 150%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(255, 42, 85, 0.8) 0%, transparent 60%);
  transform-origin: 0 0;
  animation: radar-sweep 1.5s linear infinite;
}
@keyframes radar-sweep { 0% { transform: rotate(0deg) translate(-50%, -50%); } 100% { transform: rotate(360deg) translate(-50%, -50%); } }

/* 5x5 Battle Boss Bar */
.battle-boss-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(20, 20, 28, 0.85);
  backdrop-filter: blur(12px);
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  gap: 10px;
}
.boss-side { flex: 1; min-width: 0; }
.boss-side.right { text-align: right; }
.boss-name { font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boss-hp-bar {
  height: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 99px;
  margin: 4px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.boss-hp-fill { height: 100%; border-radius: 99px; transition: width 0.4s ease; }
.boss-hp-fill.team-a { background: linear-gradient(90deg, #22c55e, #4ade80); box-shadow: 0 0 10px rgba(34, 197, 94, 0.5); }
.boss-hp-fill.team-b { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); float: right; }
.boss-hp-num { font-size: 11px; font-weight: 700; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.boss-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.round-badge { font-size: 11px; font-weight: 900; color: #ffcc00; background: rgba(255, 204, 0, 0.15); padding: 2px 10px; border-radius: 10px; border: 1px solid rgba(255, 204, 0, 0.3); }
.turn-status-pill { font-size: 10px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; }

/* 5x5 Tactical Battlefield Grids */
.battlefield-arena {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.battle-team-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.grid-row { display: flex; justify-content: center; gap: 10px; }
.battle-center-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin: 6px 0;
  position: relative;
}
.center-glow {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 10px;
  background: radial-gradient(ellipse, #ff2a55, transparent 70%);
}

/* Individual Card Battle Tile (The 5x5 Units) */
.card-battle-tile {
  width: 78px;
  background: rgba(24, 24, 32, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 6px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.card-battle-tile:hover { transform: translateY(-4px) scale(1.04); border-color: rgba(255, 255, 255, 0.4); }

/* Turn Active Indicator (Current Caster) */
.card-battle-tile.turn-active {
  border-color: #ffcc00 !important;
  box-shadow: 0 0 18px rgba(255, 204, 0, 0.7), inset 0 0 8px rgba(255, 204, 0, 0.3) !important;
  transform: scale(1.08) !important;
  z-index: 5;
}

/* Targetable Opponents when Skill Selected */
.card-battle-tile.targetable {
  border-color: #ef4444;
  animation: target-pulse 1s infinite alternate;
}
@keyframes target-pulse { 0% { box-shadow: 0 0 6px #ef4444; } 100% { box-shadow: 0 0 18px #ef4444; } }
.card-battle-tile.dead {
  filter: grayscale(100%) opacity(0.35);
  pointer-events: none;
  transform: scale(0.95);
}

.tile-avatar-box {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  background: #111;
  overflow: hidden;
  position: relative;
  margin-bottom: 4px;
}
.tile-avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.tile-avatar-box .fallback-ico { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #64748b; }
.tile-role { position: absolute; top: 3px; left: 3px; font-size: 11px; background: rgba(0, 0, 0, 0.75); border-radius: 6px; padding: 2px 4px; z-index: 2; }
.tile-effects { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; font-size: 10px; z-index: 2; }
.tile-name { font-size: 10px; font-weight: 800; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; margin-bottom: 4px; }
.tile-bars { display: flex; flex-direction: column; gap: 3px; }
.tile-bar { height: 5px; background: rgba(0, 0, 0, 0.6); border-radius: 4px; overflow: hidden; }
.tile-hp-fill { height: 100%; background: #22c55e; transition: width 0.3s ease; }
.tile-energy-fill { height: 100%; background: #3b82f6; transition: width 0.3s ease; }
.tile-energy-fill.ult-ready { background: linear-gradient(90deg, #ffcc00, #ff5500); box-shadow: 0 0 6px #ffcc00; }

/* Tactical Footer Panel */
.battle-tactical-panel {
  background: rgba(18, 18, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 14px;
  margin-top: 10px;
}
.active-caster-info {
  font-size: 13px;
  font-weight: 800;
  color: #ffcc00;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-selector-row { display: flex; gap: 8px; margin-bottom: 12px; }
.skill-btn {
  flex: 1;
  background: #272733;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;
  padding: 10px 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.skill-btn:hover:not(:disabled) { background: #373748; border-color: rgba(255, 255, 255, 0.4); }
.skill-btn.active { border-color: #ffcc00; box-shadow: 0 0 10px rgba(255, 204, 0, 0.5); background: #3a3215; }
.skill-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.skill-btn.ultimate-btn {
  background: linear-gradient(135deg, #7c2d12, #991b1b);
  border-color: #f97316;
}
.skill-btn.ultimate-btn:not(:disabled) {
  animation: ult-btn-glow 1.5s infinite alternate;
}
@keyframes ult-btn-glow { 0% { box-shadow: 0 0 8px rgba(249, 115, 22, 0.5); } 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.9); } }

.battle-sub-actions { display: flex; gap: 10px; }
.sub-act-btn {
  flex: 1;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.sub-act-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.skip-act-btn { border-color: rgba(255, 204, 0, 0.4); color: #ffcc00; }

/* Collapsible Log Drawer */
.battle-log-drawer {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 440px;
  height: 60vh;
  background: rgba(15, 15, 22, 0.98);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  animation: drawer-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes drawer-slide-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-weight: 800; color: #fff; }
.close-drawer-btn { background: transparent; border: none; color: #94a3b8; font-size: 18px; cursor: pointer; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; font-size: 12px; line-height: 1.6; color: #cbd5e1; display: flex; flex-direction: column; gap: 8px; }

/* Result Box Glow Gold */
.glow-gold-btn {
  background: linear-gradient(135deg, #ffcc00 0%, #ff7300 100%) !important;
  color: #000 !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 30px rgba(255, 204, 0, 0.5) !important;
}
.arena-result-mmr { font-size: 18px; font-weight: 900; color: #ffcc00; margin: 10px 0 4px; }
.arena-result-coins { font-size: 15px; font-weight: 800; color: #4ade80; margin-bottom: 16px; }

/* ═══════════════════════════════════════════════════════════
   PACK REVEAL — Telegram WebView safe (one phase at a time)
   No 3D rotateY / backface / mask / heavy filters.
   ═══════════════════════════════════════════════════════════ */
.pack-reveal {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: none !important;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding: max(10px, env(safe-area-inset-top, 0px)) 14px max(14px, env(safe-area-inset-bottom, 0px));
  background: #0C0B0A;
  color: #F2EDE4;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}
.pack-reveal.open {
  display: flex !important;
  pointer-events: auto;
}

.pr-skip {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 6;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(20,18,16,.85);
  color: rgba(242,237,228,.85);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pr-top {
  width: min(400px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 10px;
  padding: 0 2px;
  flex-shrink: 0;
  z-index: 2;
}
.pr-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(242,237,228,.45);
}
.pr-counter {
  font-size: 13px;
  font-weight: 600;
  color: rgba(242,237,228,.5);
  font-variant-numeric: tabular-nums;
}
.pr-counter b {
  color: #F2EDE4;
  font-size: 16px;
  font-weight: 800;
}

/* Exclusive panels — ONLY active phase is visible */
.pack-reveal .pr-panel {
  display: none !important;
  flex: 1;
  width: min(400px, 100%);
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
}
.pack-reveal[data-phase="seal"] .pr-panel[data-phase-panel="seal"],
.pack-reveal[data-phase="card"] .pr-panel[data-phase-panel="card"],
.pack-reveal[data-phase="finale"] .pr-panel[data-phase-panel="finale"] {
  display: flex !important;
}

.pr-seal-stack {
  width: min(158px, 42vw);
  aspect-ratio: 3 / 4;
  position: relative;
  margin-bottom: 4px;
}
.pr-seal-stack i {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: center / cover no-repeat url('assets/card-back.png'), #1a1510;
  border: 1px solid rgba(242,237,228,.14);
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
.pr-seal-stack i:nth-child(1) {
  transform: translate(-12px, 10px) rotate(-8deg);
  opacity: .7;
}
.pr-seal-stack i:nth-child(2) {
  transform: translate(12px, 6px) rotate(7deg);
  opacity: .85;
}
.pr-seal-stack i:nth-child(3) {
  transform: translateY(0);
  animation: pr-seal-float 1.8s ease-in-out infinite;
}
@keyframes pr-seal-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.pr-seal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #F2EDE4;
  animation: pr-fade-up .4s ease .05s both;
}
.pr-seal-hint {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(242,237,228,.4);
}

.pr-perspective {
  width: min(240px, 64vw);
  perspective: 1100px;
  -webkit-perspective: 1100px;
}
.pr-card-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: #161310;
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
  transform: none;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pr-card-frame img,
.pr-card-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  background: #161310;
}
.pr-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, color-mix(in srgb, var(--pr-c, #C9A24A) 35%, transparent), transparent 70%),
    #161310;
  text-align: center;
}
.pr-fallback-rank {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pr-c, #C9A24A);
}
.pr-fallback-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: #F2EDE4;
  word-break: break-word;
}
.pr-thumb-ph {
  width: 100%;
  height: 100%;
}
.pr-card-frame.hi-legend {
  box-shadow: 0 0 0 1px rgba(251,191,36,.55), 0 14px 36px rgba(0,0,0,.5);
}
.pr-card-frame.hi-myth {
  box-shadow: 0 0 0 1px rgba(251,113,133,.55), 0 14px 36px rgba(0,0,0,.5);
}
.pr-card-frame.hi-epic {
  box-shadow: 0 0 0 1px rgba(192,132,252,.4), 0 14px 36px rgba(0,0,0,.5);
}

.pr-meta {
  text-align: center;
  max-width: 280px;
  min-height: 64px;
  animation: pr-fade-up .28s ease both;
}
.pr-rank {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #C9A24A;
  margin-bottom: 4px;
}
.pr-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: #F2EDE4;
  word-break: break-word;
}
.pr-tags {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(242,237,228,.45);
}

.pr-trail {
  display: flex;
  gap: 5px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-height: 44px;
}
.pr-trail::-webkit-scrollbar { display: none; }
.pr-trail:empty { display: none; }
.pr-thumb {
  flex: 0 0 auto;
  width: 32px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  background: #1a1510;
  border: 1px solid rgba(255,255,255,.12);
}
.pr-thumb img,
.pr-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #161310;
}

.pr-finale-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(242,237,228,.4);
}
.pr-finale-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  line-height: 1.2;
  max-width: 320px;
  word-break: break-word;
}
.pr-finale-best {
  width: min(168px, 44vw);
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #161310;
  border: 1px solid rgba(201,162,74,.45);
  flex-shrink: 0;
}
.pr-finale-best img,
.pr-finale-best video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pr-finale-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-height: 28vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pr-finale-grid.is-single { display: none; }
.pr-finale-cell {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #161310;
  border: 1px solid rgba(255,255,255,.1);
  position: relative;
}
.pr-finale-cell.is-best { border-color: rgba(201,162,74,.7); }
.pr-finale-cell img,
.pr-finale-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #161310;
}
.pr-finale-cell span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2px 3px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  background: rgba(0,0,0,.72);
}
.pr-done {
  width: min(260px, 100%);
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  color: #16130C;
  background: #C9A24A;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  touch-action: manipulation;
}
.pr-done:active { opacity: .88; }

@keyframes pr-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pr-seal-img, .pr-seal-title, .pr-meta { animation: none; }
}
