/* ==========================================================================
   Dragon Ball Clash Action TCG — Premium Design System & Layout Engine
   Complete professional web-game redesign: sidebar, bottom bar, glassmorphism
   ========================================================================== */

/* ── Arcade TCG Design Tokens ────────────────────────────────────────────── */
:root {
  /* Arcade Carbon Surfaces */
  --bg-body: #03050a;
  --bg-sidebar: linear-gradient(180deg, #090d18 0%, #04060d 100%);
  --bg-panel: linear-gradient(135deg, rgba(12, 17, 32, 0.92) 0%, rgba(6, 9, 18, 0.96) 100%);
  --bg-panel-solid: #080c16;
  --bg-input: rgba(0, 0, 0, 0.6);
  --border-arcade: rgba(255, 215, 0, 0.25);
  --border-glass: rgba(255, 255, 255, 0.08);

  /* Arcade Palette */
  --arcade-gold: #ffd700;
  --arcade-orange: #ff8c00;
  --arcade-cyan: #00f2fe;
  --arcade-purple: #a855f7;
  --arcade-red: #ef4444;

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --font-header: 'Outfit', 'Inter', system-ui, sans-serif;

  /* Arcade Panel Borders & Shadows */
  --shadow-arcade-panel: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-arcade-btn: 0 4px 14px rgba(255, 140, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);

  /* Radius */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-full: 9999px;
}

button {
  background-color: transparent;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* ── Premium Shimmer Sweep Keyframe ──────────────────────────────────────── */
@keyframes shimmerSweep {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

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

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

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── AAA Game Scene Architecture & Transitions ───────────────────────────── */
.aaa-game-body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #020307;
  user-select: none;
  -webkit-user-select: none;
}

.game-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  overflow: hidden;
  z-index: 10;
}

.game-scene.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
}

/* Perfect Centering & Gamified Frames for PC/Console Viewports */
#scene-deck-lab,
#scene-shop,
#scene-fighter-select,
#scene-intro {
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 24px;
  background: radial-gradient(ellipse at center, #0f1730 0%, #02040a 100%);
}

#scene-deck-lab .deck-layout {
  max-width: 1240px;
  width: 100%;
  max-height: 88vh;
  margin: auto !important;
  align-self: center !important;
}

#scene-shop .store-inner {
  max-width: 860px;
  width: 100%;
  margin: auto !important;
  align-self: center !important;
}

#scene-fighter-select .fighter-select-inner {
  max-width: 960px;
  width: 100%;
  margin: auto !important;
  align-self: center !important;
}

/* Energy Curtain Transition Overlay */
.scene-transition-curtain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #ffd700 0%, #03050a 80%);
  opacity: 0;
  pointer-events: none;
  z-index: 20000;
  transition: opacity 0.35s ease-in-out;
}

.scene-transition-curtain.active {
  opacity: 1;
  pointer-events: all;
}

/* ── 1. Splash Scene (Studio Reveal) ─────────────────────────────────────── */
#scene-splash {
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0a0f24 0%, #020409 100%);
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.publisher-logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.publisher-logo-box .star-icon {
  font-size: 3rem;
  color: var(--arcade-gold);
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
  animation: pulseGlow 1.5s infinite alternate;
}

.publisher-logo-box .studio-name {
  font-family: var(--font-header);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
}

.splash-loading-bar {
  width: 240px;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--r-full);
  overflow: hidden;
  border: 1px solid rgba(255,215,0,0.3);
}

.splash-loading-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #00f2fe, #ffd700, #ff8c00);
  animation: shimmerSweep 1.5s linear infinite;
  background-size: 200% 100%;
}

.splash-official-logo {
  max-width: 320px;
  width: 85%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.85));
  animation: pulseGlow 1.5s infinite alternate;
}

/* ── 2. Title Scene (Press Start Console Screen) ─────────────────────────── */
#scene-title {
  align-items: center;
  justify-content: center;
  background: url('../imagens/background_tilescreen.png') center center / cover no-repeat !important;
  position: relative;
}

.title-official-logo {
  max-width: 520px;
  width: 88%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.95)) drop-shadow(0 8px 24px rgba(0,0,0,0.9));
  animation: floatY 4s ease-in-out infinite;
}

#scene-title::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(2, 4, 9, 0.85) 100%);
  pointer-events: none;
}

.title-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 80vh;
  padding: 40px 20px;
  text-align: center;
}

.game-brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-star {
  font-size: 1.4rem;
  color: var(--arcade-gold);
  letter-spacing: 4px;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
}

.hero-game-title {
  font-family: var(--font-header);
  font-size: 4.2rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #ffd700 40%, #ff8c00 70%, #ffffff 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
  filter: drop-shadow(0 0 45px rgba(255, 215, 0, 0.6)) drop-shadow(0 4px 16px rgba(0,0,0,0.9));
  letter-spacing: 1px;
  line-height: 1;
}

.hero-sub-subtitle {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--arcade-cyan);
  text-shadow: 0 0 16px rgba(0, 242, 254, 0.6);
}

/* Press Start AAA Button */
.press-start-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn-press-start {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 140, 0, 0.25) 100%);
  border: 2px solid var(--arcade-gold);
  border-radius: var(--r-full);
  padding: 18px 48px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.2);
  transition: all var(--t-snap);
  animation: pressStartPulse 1.2s infinite alternate ease-in-out;
}

@keyframes pressStartPulse {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
  100% { transform: scale(1.08); box-shadow: 0 0 45px rgba(255, 215, 0, 0.7); }
}

.ps-glow {
  font-family: var(--font-header);
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.9);
}

.press-start-sub {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

/* ── 3. Cinematic Intro Scene ────────────────────────────────────────────── */
#scene-intro {
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0c1228 0%, #03050b 100%);
  padding: 24px;
}

.cinematic-box {
  max-width: 640px;
  width: 100%;
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro-heading {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--arcade-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.intro-narrative {
  font-size: 1rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.intro-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Animated Dragon Ball Spinner for Loading Screen */
.splash-db-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.animated-dragonball-orb {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe600 0%, #ff8c00 60%, #cc5200 100%);
  box-shadow: 0 0 40px rgba(255, 140, 0, 0.9), inset 0 -8px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dbSpherePulse 2s infinite ease-in-out alternate, dbRotate 6s linear infinite;
  position: relative;
}

.db-star-cluster {
  color: #d91414;
  font-size: 1.1rem;
  line-height: 1.1;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.splash-loading-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--arcade-gold);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

@keyframes dbSpherePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 25px rgba(255, 140, 0, 0.6); }
  100% { transform: scale(1.08); box-shadow: 0 0 55px rgba(255, 180, 0, 0.95); }
}

@keyframes dbRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── 4. Main Menu Scene (Console AAA Arc Layout — Reference Image 2) ── */
#scene-main-menu {
  background: url('../imagens/background_menu.jpg') center center / cover no-repeat !important;
}

#scene-main-menu.active {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-hud-top {
  height: 54px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: url('../UI_PACK/Panels/panel_blue.png') center/100% 100% no-repeat;
  z-index: 100;
  width: 100%;
}

.ghud-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 50%;
  overflow: hidden;
}

.ghud-logo-mini {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7));
}

.ghud-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ghud-username {
  font-weight: 900;
  font-size: 0.9rem;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.ghud-rank {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--arcade-gold);
  white-space: nowrap;
}

.ghud-currencies {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Reference Image 2 — Arc Menu Hub Layout */
.menu-hub-arc-layout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  gap: 20px;
}

.menu-arc-left,
.menu-arc-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 320px;
}

.aaa-mode-card {
  background-color: transparent !important;
  background-image: url('../UI_PACK/Buttons/button_blue.png') !important;
  background-position: center !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  border: none !important;
  outline: none !important;
  border-radius: 0;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  text-align: left;
  transition: all var(--t-snap);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.aaa-mode-card:hover,
.aaa-mode-card.active {
  background-color: transparent !important;
  background-image: url('../UI_PACK/Buttons/button_yellow.png') !important;
  background-position: center !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  border: none !important;
  outline: none !important;
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9), 0 0 28px rgba(255, 215, 0, 0.45);
}

.amc-badge {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--arcade-cyan);
}

.amc-title {
  font-family: var(--font-header);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
}

.aaa-mode-card:hover .amc-title,
.aaa-mode-card.active .amc-title {
  color: var(--arcade-gold);
}

.amc-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Center Featured Official PNG Leader Card Frame */
.menu-hero-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.leader-stand-img {
  max-height: 320px;
  max-width: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.75));
  animation: floatY 4s ease-in-out infinite;
}

.menu-hero-card-ring {
  width: 250px;
  height: 350px;
  border-radius: 20px;
  padding: 8px;
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.3) 0%, rgba(0, 242, 254, 0.2) 50%, transparent 80%);
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatY 4s ease-in-out infinite;
}

.leader-official-card-frame {
  width: 234px;
  height: 334px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 215, 0, 0.6);
  border: 2px solid var(--arcade-gold);
}

.leader-official-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-hero-leader-label {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--arcade-gold);
  letter-spacing: 2px;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.6);
}

/* Bottom Arcade Navigation Bar */
.menu-bottom-nav {
  height: 60px;
  background: rgba(4, 6, 14, 0.96);
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  z-index: 100;
  max-width: 100vw;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.menu-bottom-nav::-webkit-scrollbar {
  display: none;
}

.bnav-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.15);
  color: var(--text-secondary);
  font-family: var(--font-header);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all var(--t-snap);
}

.bnav-item:hover,
.bnav-item.active {
  color: var(--arcade-gold);
  border-color: rgba(255, 215, 0, 0.6);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 140, 0, 0.18) 100%);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.bnav-item:hover,
.bnav-item.active {
  color: var(--arcade-gold);
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.08);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.ghud-rank {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--arcade-gold);
}

.ghud-currencies {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-hub-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 440px;
  padding: 40px;
  gap: 40px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.menu-hero-leader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.leader-stand-art {
  font-size: 8rem;
  filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.5));
  animation: floatY 4s ease-in-out infinite;
}

.leader-stand-name {
  font-family: var(--font-header);
  font-size: 2rem;
  font-weight: 900;
  color: var(--arcade-gold);
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.menu-options-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.console-menu-btn {
  background: linear-gradient(135deg, rgba(16, 22, 38, 0.95) 0%, rgba(10, 14, 26, 0.98) 100%);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--r-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  transition: all var(--t-snap);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.console-menu-btn:hover,
.console-menu-btn.active {
  background: linear-gradient(135deg, #1c2742 0%, #12192c 100%);
  border-color: var(--arcade-gold);
  transform: translateX(10px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 215, 0, 0.25);
}

.console-menu-btn .cmb-icon {
  font-size: 1.8rem;
}

.console-menu-btn .cmb-label {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  display: block;
}

.console-menu-btn:hover .cmb-label,
.console-menu-btn.active .cmb-label {
  color: var(--arcade-gold);
}

.console-menu-btn .cmb-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.console-menu-btn.feature-locked {
  opacity: 0.45;
  filter: grayscale(80%);
}

/* ── 5. Fighter Select Scene ─────────────────────────────────────────────── */
#scene-fighter-select {
  padding: 40px 24px;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0f162e 0%, #03050c 100%);
}

.fighter-select-inner {
  max-width: 960px;
  width: 100%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fs-header {
  text-align: center;
}

.fs-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--arcade-gold);
}

.fs-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Mobile Responsive Adaptations (max-width: 768px) ─────────────────────── */
@media (max-width: 768px) {
  .game-hud-top {
    height: 48px !important;
    padding: 0 8px !important;
  }

  .ghud-rank {
    display: none !important;
  }

  .ghud-username {
    font-size: 0.78rem !important;
  }

  .currency-pill {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
  }

  .auth-pill,
  .lang-toggle {
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
  }

  .menu-hub-arc-layout {
    flex-direction: column !important;
    padding: 12px !important;
    gap: 12px !important;
    overflow-y: auto !important;
  }

  .menu-arc-left,
  .menu-arc-right {
    width: 100% !important;
    gap: 10px !important;
  }

  .menu-hero-card-ring {
    width: 170px !important;
    height: 240px !important;
  }

  .leader-card-slot .card.leader-card {
    width: 156px !important;
    height: 224px !important;
  }

  .aaa-mode-card {
    padding: 12px 14px !important;
  }

  .amc-title {
    font-size: 0.9rem !important;
  }

  .menu-bottom-nav {
    height: 48px !important;
    gap: 4px !important;
    padding: 0 4px !important;
    overflow-x: auto !important;
  }

  .bnav-item {
    font-size: 0.72rem !important;
    padding: 6px 8px !important;
    white-space: nowrap !important;
  }

  .hero-game-title {
    font-size: 2.5rem !important;
  }

  .hero-sub-subtitle {
    font-size: 0.85rem !important;
  }

  .fighter-select-inner {
    padding: 16px !important;
  }

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

  .btn-press-start {
    padding: 14px 28px !important;
  }

  .ps-glow {
    font-size: 0.95rem !important;
  }
}
.glass {
  background: linear-gradient(135deg, rgba(14, 20, 36, 0.94) 0%, rgba(8, 11, 22, 0.97) 100%);
  border: 1px solid var(--border-arcade) !important;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-arcade-panel) !important;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

.glass:hover {
  border-color: rgba(255, 215, 0, 0.4) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 28px rgba(255, 215, 0, 0.15) !important;
}

.glass-solid {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-arcade);
  border-radius: var(--r-md);
}

/* ── Top Header Bar ──────────────────────────────────────────────────────── */
#app-header {
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(8, 11, 22, 0.98) 0%, rgba(12, 16, 30, 0.96) 100%);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 calc(var(--sidebar-w) + 16px);
  z-index: 200;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

/* Subtle Ki energy line running through header */
#app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,215,0,0.5) 30%, rgba(0,242,254,0.5) 70%, transparent 100%);
  animation: shimmerSweep 4s linear infinite;
  background-size: 200% 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.brand-logo .star {
  color: var(--arcade-gold);
  font-size: 1.2rem;
}

.brand-logo .title {
  color: var(--text-primary);
  font-family: var(--font-header);
  font-weight: 900;
}

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

/* Currency pills */
.currency-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 900;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(18, 24, 40, 0.9);
  color: var(--arcade-gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.currency-pill.dust {
  border-color: rgba(0, 242, 254, 0.35);
  background: rgba(18, 24, 40, 0.9);
  color: var(--arcade-cyan);
}

/* Lang toggle */
.lang-toggle {
  background: linear-gradient(135deg, #131929 0%, #0d121f 100%);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #ffd700;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: var(--r-full);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: all var(--t-fast);
}
.lang-toggle:hover {
  background: linear-gradient(135deg, #1c253d 0%, #131929 100%);
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
}

/* Auth button */
.auth-pill {
  background: linear-gradient(135deg, #161e33 0%, #0e1424 100%);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: var(--r-full);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  transition: all var(--t-fast);
}
.auth-pill:hover {
  background: linear-gradient(135deg, #ff8c00 0%, #ffd700 100%);
  color: #000000;
  border-color: #ffe566;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
}

/* ── Sidebar Navigation (PC / Tablet) ────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100dvh;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.98) 0%, rgba(4, 6, 14, 0.99) 100%);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-right: 1px solid rgba(255, 215, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 4px;
  z-index: 300;
  transition: width 0.3s var(--ease-out);
  overflow: hidden;
}

#sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(255,215,0,0.15) 30%, rgba(0,200,255,0.1) 70%, transparent 100%);
}

#sidebar:hover {
  width: var(--sidebar-w-expanded);
}

.sidebar-brand {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--ki-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.nav-item {
  width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.nav-item.active {
  color: var(--ki-yellow);
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.08);
}

.nav-item .nav-icon {
  font-size: 1.15rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .nav-label {
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

#sidebar:hover .nav-item .nav-label {
  opacity: 1;
}

/* ── Bottom Tab Bar (Mobile only) ─────────────────────────────────────────── */
#bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottombar-h);
  background: rgba(6, 8, 16, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass);
  z-index: 300;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.btab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--text-dim);
  font-size: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--t-fast);
  background: none;
  border: none;
  flex: 1;
}

.btab .btab-icon {
  font-size: 1.3rem;
}

.btab.active {
  color: var(--ki-yellow);
}

.btab.active .btab-icon {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

/* ── Main Content Area ────────────────────────────────────────────────────── */
#app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

#app-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  position: relative;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ── Common Buttons ───────────────────────────────────────────────────────── */
.btn-ki {
  background: url('../UI_PACK/Buttons/button_yellow.png') center/100% 100% no-repeat;
  border: none;
  color: #000000;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 16px 36px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
  transition: transform var(--t-snap), filter var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
}
.btn-ki:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.1) drop-shadow(0 4px 12px rgba(255, 215, 0, 0.5));
}
.btn-ki:active {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.9);
}








.btn-ghost {
  background: url('../UI_PACK/Buttons/button_blue.png') center/100% 100% no-repeat;
  border: none;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 14px 32px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  transition: transform var(--t-snap), filter var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
}
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.1) drop-shadow(0 4px 12px rgba(0, 150, 255, 0.4));
}
.btn-ghost:active {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.9);
}

.btn-ghost::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 0.5s ease;
  pointer-events: none;
}
.btn-ghost:hover::before { left: 150%; }



.btn-cyan {
  background: linear-gradient(135deg, #00f2fe 0%, #00b4d8 100%);
  border: 1px solid #7df9ff;
  color: #000000;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 13px 30px;
  border-radius: var(--r-sm);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform var(--t-snap), box-shadow var(--t-snap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-cyan:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 28px rgba(0, 242, 254, 0.5);
  filter: brightness(1.08);
}

/* ── Landing Page ─────────────────────────────────────────────────────────── */
#landing-screen {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255, 180, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 180, 255, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 15% 70%, rgba(255, 60, 60, 0.06) 0%, transparent 40%),
    url('../assets/backgrounds/landing_hero.png') no-repeat center center;
  background-size: cover;
  padding: 40px 24px;
  text-align: center;
  min-height: 100%;
  position: relative;
}

/* Cinematic vignette */
#landing-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(4,6,12,0.7) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Subtle noise texture overlay */
#landing-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

.landing-inner {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 2;
}

/* Frosted backdrop glow behind text */
.landing-inner::before {
  content: '';
  position: absolute;
  inset: -60px -80px;
  background: radial-gradient(ellipse, rgba(4,6,12,0.82) 0%, transparent 65%);
  z-index: -1;
  pointer-events: none;
}

.landing-logo {
  font-family: var(--font-header);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #ffd700 35%, #ff8c00 65%, #ffd700 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
  filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.35)) drop-shadow(0 4px 12px rgba(0,0,0,0.8));
  letter-spacing: -0.5px;
}

.landing-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.landing-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-cta .btn-ki { font-size: 1.05rem; padding: 18px 40px; border-radius: var(--r-md); letter-spacing: 1px; }
.landing-cta .btn-ghost { font-size: 1rem; padding: 16px 36px; border-radius: var(--r-md); }

.features-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 20px;
}

.feat-card {
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform var(--t-snap), border-color var(--t-fast), box-shadow var(--t-med);
  position: relative;
  overflow: hidden;
}

.feat-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255,215,0,0.05) 25%, transparent 50%);
  animation: floatY 8s ease-in-out infinite;
  pointer-events: none;
}

.feat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 215, 0, 0.2);
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.08), 0 0 0 1px rgba(255,215,0,0.1);
}

.feat-card .feat-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.3));
  animation: pulseGlow 3s ease-in-out infinite;
}
.feat-card .feat-title {
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--ki-yellow);
  text-shadow: 0 0 16px rgba(255,215,0,0.2);
}
.feat-card .feat-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ── Lobby Screen ─────────────────────────────────────────────────────────── */
#lobby-screen {
  padding: 24px;
  gap: 20px;
  align-items: center;
}

.lobby-inner {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lobby-section-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ki-yellow);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lobby-section-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Leader selection grid */
.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.leader-pick {
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-snap);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.leader-pick:hover {
  border-color: rgba(255,215,0,0.15);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 20px rgba(255,215,0,0.08);
}

.leader-pick.selected {
  border-color: var(--ki-gold);
  box-shadow: 0 0 24px rgba(255, 140, 0, 0.25), 0 0 0 1px rgba(255,215,0,0.15), inset 0 0 30px rgba(255,140,0,0.05);
  background: rgba(255, 140, 0, 0.06);
}

.leader-pick .lp-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  transition: all var(--t-snap);
  background: radial-gradient(circle at 30% 30%, rgba(255,215,0,0.08), rgba(0,0,0,0.3));
  position: relative;
}

/* Animated Ki ring around selected avatar */
.leader-pick.selected .lp-avatar {
  border-color: var(--ki-yellow);
  box-shadow: 0 0 18px var(--ki-glow), 0 0 40px rgba(255,215,0,0.15);
}

.leader-pick.selected .lp-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--ki-yellow), transparent 30%, var(--ki-yellow) 60%, transparent 90%) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: spinRing 3s linear infinite;
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.leader-pick .lp-name {
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.88rem;
}

.leader-pick .lp-style {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ki-yellow);
  text-shadow: 0 0 8px rgba(255,215,0,0.2);
}

/* Mode cards */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.mode-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-card .mc-title {
  font-size: 1rem;
  font-weight: 900;
}

.mode-card .mc-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  flex: 1;
}

.mode-card .btn-ki,
.mode-card .btn-ghost,
.mode-card .btn-cyan {
  width: 100%;
  text-align: center;
  font-size: 0.82rem;
  padding: 10px;
  margin-top: 6px;
}

/* ── Deck Builder ─────────────────────────────────────────────────────────── */
#deck-screen {
  padding: 24px;
  align-items: center;
}

.deck-layout {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  min-height: 0;
}

.deck-sidebar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100dvh - var(--header-h) - 80px);
  overflow-y: auto;
}

.deck-sidebar-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 4px;
}

.deck-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.deck-entry .de-remove {
  background: var(--dmg-red);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-weight: 900;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collection-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100dvh - var(--header-h) - 80px);
  overflow-y: auto;
}

.collection-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

/* ── Store Screen ─────────────────────────────────────────────────────────── */
#store-screen {
  padding: 40px 24px;
  align-items: center;
}

.store-inner {
  max-width: 800px;
  width: 100%;
  text-align: center;
  padding: 40px;
}

.store-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 8px;
}

.store-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.pack-reveal {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ── Dojos Screen ─────────────────────────────────────────────────────────── */
#dojos-screen {
  padding: 30px 24px;
  align-items: center;
}

.dojos-inner {
  max-width: 800px;
  width: 100%;
  padding: 28px;
}

.dojos-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 20px;
}

.dojo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.dojo-rank {
  font-weight: 900;
  color: var(--ki-yellow);
  min-width: 36px;
}

.dojo-power {
  font-weight: 900;
  color: var(--shield-cyan);
}

/* ── Chat Screen ──────────────────────────────────────────────────────────── */
#chat-screen {
  padding: 24px;
  align-items: center;
}

.chat-inner {
  max-width: 800px;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-h) - 80px);
}

.chat-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 12px;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  background: rgba(0,0,0,0.35);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04);
  font-size: 0.82rem;
}

.chat-bubble .cb-user {
  font-weight: 900;
  color: var(--ki-yellow);
}

.chat-bubble .cb-time {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-left: 6px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--t-fast);
}
.chat-input:focus {
  border-color: rgba(255, 215, 0, 0.3);
}

/* ── Auth Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px) saturate(0.8);
  -webkit-backdrop-filter: blur(12px) saturate(0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  width: 92%;
  max-width: 400px;
  padding: 36px;
  text-align: center;
  border: 1px solid rgba(255,215,0,0.08);
  box-shadow: 0 0 40px rgba(255,215,0,0.06), 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  transform: scale(0.95);
  transition: transform var(--t-snap);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  margin-bottom: 12px;
  transition: border-color var(--t-fast);
}

.modal-input:focus {
  border-color: rgba(255, 215, 0, 0.35);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.modal-actions .btn-ki,
.modal-actions .btn-ghost {
  flex: 1;
  padding: 12px;
  font-size: 0.85rem;
}

.modal-cancel {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
}

/* ── Responsive: Tablet ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #sidebar { width: var(--sidebar-w); }
  #sidebar:hover { width: var(--sidebar-w); }
  #sidebar .nav-label { display: none; }
  #app-header { padding-left: calc(var(--sidebar-w) + 12px); }

  .features-row { grid-template-columns: 1fr; }
  .deck-layout { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Responsive: Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --header-h: 48px;
  }

  #sidebar { display: none; }
  #bottom-bar { display: flex; }

  #app-header {
    padding: 0 12px;
  }

  #app-content {
    margin-left: 0;
    margin-bottom: var(--bottombar-h);
  }

  .brand-logo .title { font-size: 0.9rem; }

  .landing-logo { font-size: 1.8rem; }
  .landing-sub { font-size: 0.9rem; }
  .landing-cta { flex-direction: column; align-items: stretch; }
  .landing-cta .btn-ki,
  .landing-cta .btn-ghost { font-size: 0.9rem; padding: 14px; }

  .features-row { grid-template-columns: 1fr; gap: 10px; }
  .feat-card { padding: 16px; }

  .leader-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .leader-pick { padding: 10px 6px; }
  .leader-pick .lp-avatar { width: 56px; height: 56px; }
  .leader-pick .lp-name { font-size: 0.75rem; }

  .modes-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode-card { padding: 14px; }

  .deck-layout { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }

  .store-inner { padding: 24px; }
  .store-title { font-size: 1.3rem; }

  .chat-inner { height: calc(100dvh - var(--header-h) - var(--bottombar-h) - 48px); }

  /* HUD Top and AAA Arc mode mobile scale fixes */
  .game-hud-top {
    height: auto;
    min-height: 54px;
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 10px;
    background: url('../UI_PACK/Panels/panel_blue.png') center/100% 100% no-repeat;
  }
  .ghud-currencies {
    width: 100%;
    justify-content: space-between;
  }
  .menu-hub-arc-layout {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    overflow-y: auto;
  }
  .menu-arc-left, .menu-arc-right {
    width: 100%;
  }
  .menu-hero-card-container {
    transform: scale(0.8);
    margin: -20px 0;
  }
  .menu-bottom-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .modes-grid { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: repeat(2, 1fr); }
  .currency-pill { font-size: 0.65rem; padding: 3px 8px; }
}


/* ── STRICT MOBILE VIEWPORT OVERFLOW LOCK ───────────────────────────────── */
@media (max-width: 768px) {
  html, body, #app-body, #app-content, .screen, #arena-screen, #landing-screen, #lobby-screen, #deck-screen {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
}


/* ── HIDE APP HEADER ON LANDING & ARENA ───────────────────────────────────── */
body.hide-header #app-header {
  display: none !important;
}

body.hide-header #app-content {
  margin-top: 0 !important;
  height: 100vh !important;
}

body.arena-active #bottom-bar {
  display: none !important;
}

@media (max-width: 768px) {
  body.arena-active #app-content {
    margin-bottom: 0 !important;
  }
}
=======
/* ==========================================================================
   Dragon Ball Clash Action TCG — Premium Design System & Layout Engine
   Complete professional web-game redesign: sidebar, bottom bar, glassmorphism
   ========================================================================== */

/* ── Design Tokens ───────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg-body: #060810;
  --bg-sidebar: rgba(8, 12, 22, 0.96);
  --bg-panel: rgba(12, 16, 28, 0.82);
  --bg-panel-solid: #0c101c;
  --bg-input: rgba(0, 0, 0, 0.45);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);

  /* Ki Palette */
  --ki-yellow: #ffd700;
  --ki-gold: #ff8c00;
  --ki-glow: rgba(255, 215, 0, 0.45);
  --ki-gradient: linear-gradient(135deg, #ffd700, #ff8c00);

  /* Status Colors */
  --hp-bar: #22d3ee;
  --hp-bar-low: #ef4444;
  --hp-green: #34d399;
  --dmg-red: #ef4444;
  --shield-cyan: #06b6d4;

  /* Card Type Colors */
  --c-attack: #ef4444;
  --c-defense: #22d3ee;
  --c-evade: #2dd4bf;
  --c-counter: #fbbf24;
  --c-tech: #a78bfa;

  /* Typography */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --t-fast: 0.15s var(--ease-out);
  --t-med: 0.25s var(--ease-out);
  --t-snap: 0.3s var(--ease-snap);

  /* Layout */
  --sidebar-w: 68px;
  --sidebar-w-expanded: 220px;
  --header-h: 52px;
  --bottombar-h: 60px;
}

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Glassmorphism Panel ─────────────────────────────────────────────────── */
.glass {
  background: var(--bg-panel);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-md);
}

.glass-solid {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-md);
}

/* ── Top Header Bar ──────────────────────────────────────────────────────── */
#app-header {
  height: var(--header-h);
  background: rgba(6, 8, 16, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 calc(var(--sidebar-w) + 16px);
  z-index: 200;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.brand-logo .star {
  background: var(--ki-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.2rem;
}

.brand-logo .title {
  background: var(--ki-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Currency pills */
.currency-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: rgba(255, 215, 0, 0.06);
  color: var(--ki-yellow);
}

.currency-pill.dust {
  border-color: rgba(34, 211, 238, 0.2);
  background: rgba(34, 211, 238, 0.06);
  color: var(--shield-cyan);
}

/* Lang toggle */
.lang-toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast);
}
.lang-toggle:hover {
  background: rgba(255,215,0,0.1);
  color: var(--ki-yellow);
  border-color: rgba(255,215,0,0.3);
}

/* Auth button */
.auth-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast);
}
.auth-pill:hover {
  background: rgba(255,215,0,0.12);
  color: var(--ki-yellow);
}

/* ── Sidebar Navigation (PC / Tablet) ────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100dvh;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 4px;
  z-index: 300;
  transition: width 0.25s var(--ease-out);
  overflow: hidden;
}

#sidebar:hover {
  width: var(--sidebar-w-expanded);
}

.sidebar-brand {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--ki-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.nav-item {
  width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.nav-item.active {
  color: var(--ki-yellow);
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.08);
}

.nav-item .nav-icon {
  font-size: 1.15rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .nav-label {
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

#sidebar:hover .nav-item .nav-label {
  opacity: 1;
}

/* ── Bottom Tab Bar (Mobile only) ─────────────────────────────────────────── */
#bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottombar-h);
  background: rgba(6, 8, 16, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass);
  z-index: 300;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.btab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--text-dim);
  font-size: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--t-fast);
  background: none;
  border: none;
  flex: 1;
}

.btab .btab-icon {
  font-size: 1.3rem;
}

.btab.active {
  color: var(--ki-yellow);
}

.btab.active .btab-icon {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

/* ── Main Content Area ────────────────────────────────────────────────────── */
#app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

#app-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  position: relative;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ── Common Buttons ───────────────────────────────────────────────────────── */
.btn-ki {
  background: var(--ki-gradient);
  border: none;
  color: #000;
  font-weight: 900;
  font-size: 0.88rem;
  padding: 12px 28px;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 16px rgba(255, 215, 0, 0.25);
  transition: transform var(--t-snap), box-shadow var(--t-snap);
  position: relative;
  overflow: hidden;
}

.btn-ki::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--t-fast);
}


.btn-ki:hover::after { opacity: 1; }



.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 12px 28px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
}


.btn-cyan {
  background: linear-gradient(135deg, #22d3ee, #06b6d4);
  border: none;
  color: #000;
  font-weight: 900;
  font-size: 0.88rem;
  padding: 12px 28px;
  border-radius: var(--r-sm);
  cursor: pointer;
  box-shadow: 0 2px 16px rgba(34, 211, 238, 0.25);
  transition: transform var(--t-snap), box-shadow var(--t-snap);
}
.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.35);
}

/* ── Landing Page ─────────────────────────────────────────────────────────── */
#landing-screen {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 140, 0, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    url('../assets/backgrounds/landing_hero.png') no-repeat center center;
  background-size: cover;
  padding: 40px 24px;
  text-align: center;
  min-height: 100%;
}

.landing-inner {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 2;
}

/* Frosted overlay behind text */
.landing-inner::before {
  content: '';
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(ellipse, rgba(6,8,16,0.75) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.landing-logo {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, #ffd700 45%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.3));
}

.landing-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.55;
}

.landing-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-cta .btn-ki { font-size: 1rem; padding: 16px 36px; }
.landing-cta .btn-ghost { font-size: 1rem; padding: 16px 36px; }

.features-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 20px;
}

.feat-card {
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform var(--t-snap), border-color var(--t-fast);
}

.feat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 215, 0, 0.2);
}

.feat-card .feat-icon { font-size: 2rem; }
.feat-card .feat-title {
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--ki-yellow);
}
.feat-card .feat-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Lobby Screen ─────────────────────────────────────────────────────────── */
#lobby-screen {
  padding: 24px;
  gap: 20px;
  align-items: center;
}

.lobby-inner {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lobby-section-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ki-yellow);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lobby-section-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Leader selection grid */
.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.leader-pick {
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-snap);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.leader-pick:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-3px);
}

.leader-pick.selected {
  border-color: var(--ki-gold);
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.2);
  background: rgba(255, 140, 0, 0.06);
}

.leader-pick .lp-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: border-color var(--t-fast);
}

.leader-pick.selected .lp-avatar {
  border-color: var(--ki-yellow);
  box-shadow: 0 0 14px var(--ki-glow);
}

.leader-pick .lp-name {
  font-weight: 900;
  font-size: 0.85rem;
}

.leader-pick .lp-style {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ki-yellow);
}

/* Mode cards */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.mode-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-card .mc-title {
  font-size: 1rem;
  font-weight: 900;
}

.mode-card .mc-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  flex: 1;
}

.mode-card .btn-ki,
.mode-card .btn-ghost,
.mode-card .btn-cyan {
  width: 100%;
  text-align: center;
  font-size: 0.82rem;
  padding: 10px;
  margin-top: 6px;
}

/* ── Deck Builder ─────────────────────────────────────────────────────────── */
#deck-screen {
  padding: 24px;
  align-items: center;
}

.deck-layout {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  min-height: 0;
}

.deck-sidebar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100dvh - var(--header-h) - 80px);
  overflow-y: auto;
}

.deck-sidebar-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 4px;
}

.deck-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.deck-entry .de-remove {
  background: var(--dmg-red);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-weight: 900;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collection-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100dvh - var(--header-h) - 80px);
  overflow-y: auto;
}

.collection-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

/* ── Store Screen ─────────────────────────────────────────────────────────── */
#store-screen {
  padding: 40px 24px;
  align-items: center;
}

.store-inner {
  max-width: 800px;
  width: 100%;
  text-align: center;
  padding: 40px;
}

.store-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 8px;
}

.store-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.pack-reveal {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ── Dojos Screen ─────────────────────────────────────────────────────────── */
#dojos-screen {
  padding: 30px 24px;
  align-items: center;
}

.dojos-inner {
  max-width: 800px;
  width: 100%;
  padding: 28px;
}

.dojos-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 20px;
}

.dojo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.dojo-rank {
  font-weight: 900;
  color: var(--ki-yellow);
  min-width: 36px;
}

.dojo-power {
  font-weight: 900;
  color: var(--shield-cyan);
}

/* ── Chat Screen ──────────────────────────────────────────────────────────── */
#chat-screen {
  padding: 24px;
  align-items: center;
}

.chat-inner {
  max-width: 800px;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-h) - 80px);
}

.chat-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 12px;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  background: rgba(0,0,0,0.35);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.04);
  font-size: 0.82rem;
}

.chat-bubble .cb-user {
  font-weight: 900;
  color: var(--ki-yellow);
}

.chat-bubble .cb-time {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-left: 6px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--t-fast);
}
.chat-input:focus {
  border-color: rgba(255, 215, 0, 0.3);
}

/* ── Auth Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  width: 92%;
  max-width: 400px;
  padding: 32px;
  text-align: center;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--ki-yellow);
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  margin-bottom: 12px;
  transition: border-color var(--t-fast);
}

.modal-input:focus {
  border-color: rgba(255, 215, 0, 0.35);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.modal-actions .btn-ki,
.modal-actions .btn-ghost {
  flex: 1;
  padding: 12px;
  font-size: 0.85rem;
}

.modal-cancel {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
}

/* ── Responsive: Tablet ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #sidebar { width: var(--sidebar-w); }
  #sidebar:hover { width: var(--sidebar-w); }
  #sidebar .nav-label { display: none; }
  #app-header { padding-left: calc(var(--sidebar-w) + 12px); }

  .features-row { grid-template-columns: 1fr; }
  .deck-layout { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Responsive: Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --header-h: 48px;
  }

  #sidebar { display: none; }
  #bottom-bar { display: flex; }

  #app-header {
    padding: 0 12px;
  }

  #app-content {
    margin-left: 0;
    margin-bottom: var(--bottombar-h);
  }

  .brand-logo .title { font-size: 0.9rem; }

  .landing-logo { font-size: 1.8rem; }
  .landing-sub { font-size: 0.9rem; }
  .landing-cta { flex-direction: column; align-items: stretch; }
  .landing-cta .btn-ki,
  .landing-cta .btn-ghost { font-size: 0.9rem; padding: 14px; }

  .features-row { grid-template-columns: 1fr; gap: 10px; }
  .feat-card { padding: 16px; }

  .leader-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .leader-pick { padding: 10px 6px; }
  .leader-pick .lp-avatar { width: 56px; height: 56px; }
  .leader-pick .lp-name { font-size: 0.75rem; }

  .modes-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode-card { padding: 14px; }

  .deck-layout { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }

  .store-inner { padding: 24px; }
  .store-title { font-size: 1.3rem; }

  .chat-inner { height: calc(100dvh - var(--header-h) - var(--bottombar-h) - 48px); }
}

@media (max-width: 420px) {
  .modes-grid { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: repeat(2, 1fr); }
  .currency-pill { font-size: 0.65rem; padding: 3px 8px; }
}


/* ── STRICT MOBILE VIEWPORT OVERFLOW LOCK ───────────────────────────────── */
@media (max-width: 768px) {
  html, body, #app-body, #app-content, .screen, #arena-screen, #landing-screen, #lobby-screen, #deck-screen {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
}


/* ── HIDE APP HEADER ON LANDING & ARENA ───────────────────────────────────── */
body.hide-header #app-header {
  display: none !important;
}

body.hide-header #app-content {
  margin-top: 0 !important;
  height: 100vh !important;
}

body.arena-active #bottom-bar {
  display: none !important;
}

@media (max-width: 768px) {
  body.arena-active #app-content {
    margin-bottom: 0 !important;
  }
}
>>>>>>> 75cdb2b5faac518831c31cadd3baa480b065f443


/* Mobile Top Header Single-Row Non-Overlapping Layout Fix */
@media (max-width: 768px) {
  .game-hud-top {
    height: 44px !important;
    padding: 0 10px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    z-index: 1000 !important;
  }

  .ghud-profile {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .ghud-logo-mini {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }

  .ghud-username {
    font-size: 0.74rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .ghud-currencies {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .currency-pill {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
  }

  .auth-pill {
    padding: 2px 8px !important;
    font-size: 0.68rem !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
  }
}


/* ── DECK LAB REDESIGN (OFFICIAL DBZ IDENTITY) ─────────────── */
.deck-lab-container {
  width: 100%;
  max-width: 1240px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto;
}

.deck-lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 2px solid #ffd700;
  border-radius: var(--r-md);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

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

.dl-logo-icon {
  font-size: 1.3rem;
  color: #ffd700;
  text-shadow: 0 0 8px #ff8c00;
}

.dl-header-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.dl-back-btn {
  padding: 6px 16px !important;
  font-size: 0.85rem !important;
  min-width: auto !important;
}

/* Capsule Entries for Active Deck Cards */
.deck-entry-capsule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-left: 4px solid #ffd700;
  border-radius: 6px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.deck-entry-capsule:hover {
  background: rgba(255, 215, 0, 0.12);
  border-color: #ffd700;
  transform: translateX(2px);
}

.de-capsule-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  overflow: hidden;
}

.de-ki-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  color: #000;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.de-card-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}

.de-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: transform 0.15s ease;
}

.de-remove-btn:hover {
  transform: scale(1.25);
  color: #ff6b6b;
}

/* ── Mobile Specific Adjustments ── */
@media (max-width: 768px) {
  #scene-deck-lab.active {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: env(safe-area-inset-top) 8px env(safe-area-inset-bottom) 8px !important;
  }

  .deck-lab-container {
    height: 100%;
    max-height: 100%;
    gap: 8px;
  }

  .deck-lab-header {
    padding: 8px 12px;
    flex-shrink: 0;
  }

  .dl-header-title {
    font-size: 0.9rem;
  }

  .deck-layout {
    display: flex !important;
    flex-direction: column !important;
    flex: 1;
    overflow: hidden;
    gap: 8px !important;
  }

  .deck-sidebar {
    flex-shrink: 0;
    max-height: 35vh;
    display: flex;
    flex-direction: column;
    padding: 10px !important;
  }

  .deck-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
  }

  .collection-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px !important;
  }

  .collection-scroll-area {
    flex: 1;
    overflow-y: auto;
  }

  .collection-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)) !important;
    gap: 8px !important;
    justify-items: center;
  }

  .collection-grid .card {
    width: 75px !important;
    height: 105px !important;
    min-width: unset !important;
  }
}

/* ── PWA Install Banner ─────────────────────────────── */
.pwa-banner-card {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(6, 9, 18, 0.98));
  border-top: 2px solid #ffd700;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 215, 0, 0.1);
  animation: pwaSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pwaSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 580px;
  margin: 0 auto;
}

.pwa-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.pwa-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pwa-text strong {
  font-family: var(--font-header, 'Outfit', sans-serif);
  color: #ffd700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-text span {
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.3;
}

#btn-install-pwa {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.78rem !important;
  padding: 8px 18px !important;
  min-width: 110px;
  text-align: center;
}

.pwa-close-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@media (max-width: 480px) {
  .pwa-banner-card {
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .pwa-icon {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  .pwa-text strong { font-size: 0.78rem; }
  .pwa-text span { font-size: 0.65rem; }
  #btn-install-pwa { font-size: 0.72rem !important; padding: 6px 14px !important; min-width: 90px; }
}

