/* ===================================================
   POKEWORLD – 2026 Modern Gaming UI
   Dark glassmorphism + neon Pokémon style
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Exo+2:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg-deep:       #060914;
  --bg-dark:       #0b1121;
  --bg-card:       rgba(13, 20, 40, 0.85);
  --bg-card2:      rgba(20, 30, 60, 0.75);
  --neon-blue:     #00d4ff;
  --neon-purple:   #a855f7;
  --neon-cyan:     #06ffd8;
  --neon-yellow:   #ffd700;
  --neon-red:      #ff4d6d;
  --neon-green:    #39ff8f;
  --text-primary:  #e8eeff;
  --text-muted:    #7890b8;
  --text-dim:      #4a5a7a;
  --border-glow:   rgba(0, 212, 255, 0.25);
  --border-subtle: rgba(100, 140, 200, 0.15);
  --gradient-main: linear-gradient(135deg, #060914 0%, #0d1a35 50%, #060914 100%);
  --gradient-card: linear-gradient(145deg, rgba(13,20,45,0.9), rgba(8,14,30,0.95));
  --shadow-neon:   0 0 20px rgba(0, 212, 255, 0.15), 0 0 60px rgba(0, 212, 255, 0.05);
  --shadow-card:   0 8px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 212, 255, 0.08);
  --radius:        12px;
  --radius-lg:     18px;
  --transition:    all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Exo 2', 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 10% 0%, rgba(168, 85, 247, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 90% 100%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
    var(--gradient-main);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Starfield background dots */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 65%, rgba(255,255,255,0.08) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout Shell ── */
.game-shell {
  display: grid;
  /* In RTL the grid columns are: right-panel(200px) | main(1fr) | sidebar(220px)
     We name them explicitly so direction doesn't flip their meaning.          */
  /* ב-RTL עמודה ראשונה בטמפלייט = ימנית ביותר:
     sidebar(ניווט, 220px) | main(1fr) | rpanel(כרטיס מאמן, 200px) */
  grid-template-columns: 220px 1fr 200px;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "topbar  topbar  topbar"
    "sidebar main    rpanel";
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.topbar       { grid-area: topbar;  }
.sidebar      { grid-area: sidebar; }
.main-content { grid-area: main; min-width: 0; }
.right-panel  { grid-area: rpanel;  }

@media (max-width: 1100px) {
  .game-shell {
    grid-template-columns: 220px 1fr;
    grid-template-areas:
      "topbar  topbar"
      "sidebar main";
  }
  .right-panel { display: none; }
}
@media (max-width: 768px) {
  .game-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "main";
  }
  .sidebar { display: none; }
}

/* ── Top Bar ── */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(6, 9, 20, 0.95);
  border-bottom: 1px solid var(--border-glow);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 212, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar-logo img { height: 46px; }
.topbar-logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.topbar-user {
  /* צמוד ללוגו בימין — ללא margin אוטומטי */
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-nav {
  /* נדחף לצד שמאל */
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-currency {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--neon-yellow);
}
.topbar-username {
  font-weight: 600;
  color: var(--neon-cyan);
}
.topbar-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
  background: rgba(0, 212, 255, 0.08);
  color: var(--neon-blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.topbar-btn:hover {
  background: rgba(0, 212, 255, 0.18);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
  color: var(--neon-blue);
}
.topbar-btn.danger {
  border-color: rgba(255, 77, 109, 0.3);
  background: rgba(255, 77, 109, 0.08);
  color: var(--neon-red);
}
.topbar-btn.danger:hover {
  background: rgba(255, 77, 109, 0.18);
  box-shadow: 0 0 12px rgba(255, 77, 109, 0.3);
}

/* ── Sidebar Navigation ── */
.sidebar {
  background: rgba(8, 12, 24, 0.9);
  border-inline-start: 1px solid var(--border-subtle); /* logical → left border in RTL */
  padding: 20px 12px;
  backdrop-filter: blur(20px);
  overflow-y: auto;
  height: calc(100vh - 61px);
  position: sticky;
  top: 61px;
}

.nav-section {
  margin-bottom: 24px;
}
.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 8px;
  margin-bottom: 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  border: 1px solid transparent;
}
.nav-link:hover {
  color: var(--neon-blue);
  background: rgba(0, 212, 255, 0.07);
  border-color: rgba(0, 212, 255, 0.15);
}
.nav-link.active {
  color: var(--neon-blue);
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.1);
}
.nav-link .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-badge {
  margin-inline-start: auto;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255, 77, 109, 0.2);
  color: var(--neon-red);
  font-weight: 700;
}

/* ── Main Content ── */
.main-content {
  padding: 24px 20px;
  overflow-y: auto;
  min-height: calc(100vh - 61px);
}

/* ── Right Panel (trainer card / notifications) ── */
.right-panel {
  background: rgba(8, 12, 24, 0.9);
  border-inline-end: 1px solid var(--border-subtle); /* logical → right border in RTL */
  padding: 16px 12px;
  backdrop-filter: blur(20px);
  overflow-y: auto;
  height: calc(100vh - 61px);
  position: sticky;
  top: 61px;
}

/* ── Cards / Panels ── */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-neon), var(--shadow-card);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
.card-title .accent { color: var(--neon-blue); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: 'Exo 2', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.3px;
}
.btn-primary {
  background: linear-gradient(135deg, #0088cc, #0044aa);
  border-color: rgba(0, 212, 255, 0.4);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #00aaff, #0055cc);
  box-shadow: 0 6px 20px rgba(0, 170, 255, 0.5);
  transform: translateY(-1px);
  color: #fff;
}
.btn-danger {
  background: linear-gradient(135deg, #cc003c, #880022);
  border-color: rgba(255, 77, 109, 0.4);
  color: #fff;
  box-shadow: 0 4px 15px rgba(200, 0, 60, 0.3);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #ff1a50, #aa0030);
  box-shadow: 0 6px 20px rgba(255, 50, 80, 0.5);
  transform: translateY(-1px);
}
.btn-success {
  background: linear-gradient(135deg, #009955, #006633);
  border-color: rgba(57, 255, 143, 0.4);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 153, 85, 0.3);
}
.btn-success:hover {
  background: linear-gradient(135deg, #00cc66, #008844);
  box-shadow: 0 6px 20px rgba(0, 200, 100, 0.5);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(100, 120, 180, 0.1);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}
.btn-secondary:hover {
  background: rgba(100, 120, 180, 0.2);
  border-color: var(--border-glow);
  color: var(--text-primary);
}
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; }
.btn:disabled, .btn.disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--neon-blue);
  background: rgba(0, 212, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
.form-control::placeholder { color: var(--text-dim); }
select.form-control option { background: var(--bg-dark); }

/* ── HP / EXP Bars ── */
.stat-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.stat-bar-label {
  font-size: 11px;
  font-weight: 700;
  width: 30px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.stat-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.stat-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.bar-hp  { background: linear-gradient(90deg, #00cc55, #00ff88); box-shadow: 0 0 8px rgba(0,255,100,0.4); }
.bar-hp-low { background: linear-gradient(90deg, #ff4400, #ff8800); box-shadow: 0 0 8px rgba(255,100,0,0.4); }
.bar-exp { background: linear-gradient(90deg, #0088ff, #00d4ff); box-shadow: 0 0 8px rgba(0,180,255,0.4); }
.stat-bar-value { font-size: 11px; color: var(--text-muted); min-width: 60px; text-align: right; }

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  padding: 10px 12px;
  text-align: left;
  background: rgba(0, 212, 255, 0.06);
  color: var(--neon-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-glow);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tr:hover td { background: rgba(0, 212, 255, 0.03); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Alerts / Messages ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-info, .blue {
  background: rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.3);
  color: #7dd3fc;
}
.alert-success, .green {
  background: rgba(0, 153, 85, 0.1);
  border-color: rgba(0, 153, 85, 0.3);
  color: #6ee7b7;
}
.alert-warning, .orange {
  background: rgba(204, 120, 0, 0.1);
  border-color: rgba(204, 120, 0, 0.3);
  color: #fcd34d;
}
.alert-danger, .red {
  background: rgba(204, 0, 60, 0.1);
  border-color: rgba(204, 0, 60, 0.3);
  color: #fca5a5;
}
.ok {
  background: rgba(0, 153, 85, 0.1);
  border: 1px solid rgba(0, 153, 85, 0.3);
  color: #6ee7b7;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

/* ── Badge / Tags ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-blue   { background: rgba(0, 212, 255, 0.15); color: var(--neon-blue); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--neon-purple); }
.badge-green  { background: rgba(57, 255, 143, 0.15); color: var(--neon-green); }
.badge-red    { background: rgba(255, 77, 109, 0.15); color: var(--neon-red); }
.badge-yellow { background: rgba(255, 215, 0, 0.15); color: var(--neon-yellow); }

/* ── Pokemon Type Badges ── */
.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  margin: 1px;
}
.type-fire     { background: rgba(255, 68, 0, 0.2); color: #ff8844; border: 1px solid rgba(255, 68, 0, 0.3); }
.type-water    { background: rgba(0, 136, 255, 0.2); color: #66aaff; border: 1px solid rgba(0, 136, 255, 0.3); }
.type-grass    { background: rgba(0, 200, 80, 0.2); color: #44dd88; border: 1px solid rgba(0, 200, 80, 0.3); }
.type-electric { background: rgba(255, 215, 0, 0.2); color: #ffdd44; border: 1px solid rgba(255, 215, 0, 0.3); }
.type-psychic  { background: rgba(220, 0, 150, 0.2); color: #ff66cc; border: 1px solid rgba(220, 0, 150, 0.3); }
.type-normal   { background: rgba(160, 160, 160, 0.2); color: #aaaaaa; border: 1px solid rgba(160,160,160,0.3); }
.type-fighting { background: rgba(200, 60, 0, 0.2); color: #ff8866; border: 1px solid rgba(200,60,0,0.3); }
.type-poison   { background: rgba(160, 0, 200, 0.2); color: #cc77ff; border: 1px solid rgba(160,0,200,0.3); }
.type-ground   { background: rgba(180, 130, 0, 0.2); color: #ddaa44; border: 1px solid rgba(180,130,0,0.3); }
.type-rock     { background: rgba(140, 120, 80, 0.2); color: #bbaa77; border: 1px solid rgba(140,120,80,0.3); }
.type-bug      { background: rgba(120, 180, 0, 0.2); color: #aacc44; border: 1px solid rgba(120,180,0,0.3); }
.type-ghost    { background: rgba(100, 60, 160, 0.2); color: #aa88dd; border: 1px solid rgba(100,60,160,0.3); }
.type-steel    { background: rgba(160, 180, 200, 0.2); color: #aabbcc; border: 1px solid rgba(160,180,200,0.3); }
.type-dragon   { background: rgba(80, 0, 200, 0.2); color: #8866ff; border: 1px solid rgba(80,0,200,0.3); }
.type-dark     { background: rgba(80, 60, 60, 0.2); color: #998877; border: 1px solid rgba(80,60,60,0.3); }
.type-ice      { background: rgba(100, 220, 240, 0.2); color: #88ddee; border: 1px solid rgba(100,220,240,0.3); }
.type-flying   { background: rgba(120, 160, 255, 0.2); color: #99aaff; border: 1px solid rgba(120,160,255,0.3); }

/* ── ===== BATTLE SCREEN ===== ── */
/* ══════════════════════════════════════════════════
   BATTLE SYSTEM — 2026 Visual Upgrade
   ══════════════════════════════════════════════════ */
.battle-screen {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  background: var(--gradient-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,212,255,0.15), var(--shadow-neon);
  max-width: 860px;
  margin: 0 auto;
}

/* ── Battle arena ─────────────────────────────── */
.battle-arena {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  /* Deep night sky gradient */
  background:
    linear-gradient(180deg,
      #020510 0%,
      #040c1c 30%,
      #06111f 60%,
      #0b1d30 80%,
      #0e2438 100%);
}

/* Star field + subtle aurora */
.battle-arena::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    /* Stars */
    radial-gradient(1.5px 1.5px at  8% 12%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(1px   1px   at 18% 7%,  rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px   1px   at 30% 18%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 42% 8%,  rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(1px   1px   at 55% 14%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(1px   1px   at 68% 5%,  rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 20%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px   1px   at 88% 9%,  rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px   1px   at 94% 16%, rgba(255,255,255,0.40) 0%, transparent 100%),
    radial-gradient(1px   1px   at 12% 28%, rgba(255,255,255,0.30) 0%, transparent 100%),
    radial-gradient(1px   1px   at 50% 22%, rgba(255,255,255,0.35) 0%, transparent 100%),
    /* Subtle aurora bands */
    radial-gradient(ellipse 60% 20% at 30% 35%, rgba(0,212,255,0.04) 0%, transparent 100%),
    radial-gradient(ellipse 50% 15% at 70% 40%, rgba(57,255,143,0.03) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
/* Bottom ground glow + center light */
.battle-arena::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background:
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(0,212,255,0.09) 0%, transparent 70%),
    linear-gradient(0deg, rgba(0,212,255,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Ground platform ──────────────────────────── */
.battle-ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 88px;
  background:
    linear-gradient(0deg, rgba(4,10,22,0.95) 0%, transparent 100%);
  border-top: 1px solid rgba(0,212,255,0.10);
  z-index: 1;
}
/* Player platform (left) — green glow */
.battle-ground-player {
  position: absolute;
  bottom: 4px;
  left: 6%; right: 50%;
  height: 56px;
  border-top: 2px solid rgba(57,255,143,0.45);
  border-radius: 50%;
  box-shadow: 0 -6px 30px rgba(57,255,143,0.12), inset 0 -4px 16px rgba(57,255,143,0.06);
  background: radial-gradient(ellipse 80% 60% at 50% 100%,
    rgba(57,255,143,0.12) 0%,
    rgba(57,255,143,0.04) 60%,
    transparent 100%);
  z-index: 2;
}
/* Enemy platform (right) — red glow */
.battle-ground-enemy {
  position: absolute;
  bottom: 4px;
  left: 50%; right: 6%;
  height: 46px;
  border-top: 2px solid rgba(255,77,109,0.45);
  border-radius: 50%;
  box-shadow: 0 -6px 30px rgba(255,77,109,0.12), inset 0 -4px 16px rgba(255,77,109,0.06);
  background: radial-gradient(ellipse 80% 60% at 50% 100%,
    rgba(255,77,109,0.12) 0%,
    rgba(255,77,109,0.04) 60%,
    transparent 100%);
  z-index: 2;
}

/* ── Pokémon sprites & wraps ──────────────────── */
/* Player sprite: bottom-LEFT — z-index 12 ensures it's always above status boxes */
.pokemon-player-wrap {
  position: absolute;
  bottom: 10px;
  left: 14%;
  text-align: center;
  z-index: 12;
  animation: float-player 3s ease-in-out infinite;
  transform-origin: center bottom;
}
/* Enemy sprite: bottom-RIGHT */
.pokemon-enemy-wrap {
  position: absolute;
  bottom: 0px;
  right: 14%;
  text-align: center;
  z-index: 12;
  animation: float-enemy 3.7s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes float-player {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-2px); }
}
@keyframes float-enemy {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-2px); }
}

.pokemon-sprite {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  /* Player sprite: green glow (matches player platform) */
  filter: drop-shadow(0 6px 18px rgba(57,255,143,0.40)) drop-shadow(0 2px 6px rgba(0,0,0,0.8));
  width: 100px;
  height: 100px;
  object-fit: contain;
  transition: filter 0.2s;
}
.pokemon-sprite.enemy {
  /* Enemy sprite: red/cyan glow */
  filter: drop-shadow(0 6px 18px rgba(255,77,109,0.40)) drop-shadow(0 2px 6px rgba(0,0,0,0.8));
  width: 110px;
  height: 110px;
}

/* ── Attack animations ────────────────────────── */
.pokemon-player-wrap.attacking {
  animation: attack-lunge 0.5s ease-in-out, float-player 3s ease-in-out 0.5s infinite;
}
.pokemon-enemy-wrap.attacking {
  animation: attack-lunge-enemy 0.5s ease-in-out, float-enemy 3.7s ease-in-out 0.5s infinite;
}
.pokemon-sprite.taking-hit {
  animation: take-hit 0.55s ease-in-out;
}
@keyframes attack-lunge {
  0%   { transform: translateX(0); }
  30%  { transform: translateX(28px); }
  55%  { transform: translateX(18px); }
  100% { transform: translateX(0); }
}
@keyframes attack-lunge-enemy {
  0%   { transform: translateX(0); }
  30%  { transform: translateX(-28px); }
  55%  { transform: translateX(-18px); }
  100% { transform: translateX(0); }
}
@keyframes take-hit {
  0%   { opacity: 1;   filter: drop-shadow(0 6px 16px rgba(255,255,255,0)); }
  15%  { opacity: 0.1; filter: drop-shadow(0 0 30px rgba(255,255,255,1)) brightness(10); }
  30%  { opacity: 0.8; filter: drop-shadow(0 0 20px rgba(255,60,60,0.9)); }
  50%  { opacity: 0.2; filter: drop-shadow(0 0 24px rgba(255,60,60,1)); }
  70%  { opacity: 0.7; filter: drop-shadow(0 0 16px rgba(255,60,60,0.7)); }
  85%  { opacity: 0.9; filter: drop-shadow(0 0 10px rgba(255,60,60,0.4)); }
  100% { opacity: 1;   filter: drop-shadow(0 6px 16px rgba(255,77,109,0.35)); }
}

/* ── Center attack effect overlay ─────────────── */
/* ── Attack visual effect overlay ─────────────── */
#attack-effect {
  position: absolute;
  top: 50%; left: 50%;
  width: 140px; height: 140px;
  margin-top: -70px; margin-left: -70px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 20;
  display: none;
  opacity: 0;
}
/* Base burst animation — fire, electric, psychic, fairy, fighting, normal */
#attack-effect.show { display: block; animation: attack-burst 0.65s ease-out forwards; }
@keyframes attack-burst {
  0%   { transform: scale(0.15); opacity: 1; }
  35%  { transform: scale(1.0);  opacity: 0.85; }
  65%  { transform: scale(1.6);  opacity: 0.45; }
  100% { transform: scale(2.4);  opacity: 0; }
}

/* Beam animation — water, ice, flying, dragon */
#attack-effect.show.type-water,
#attack-effect.show.type-ice,
#attack-effect.show.type-flying,
#attack-effect.show.type-dragon {
  animation: attack-beam 0.6s ease-in-out forwards;
  border-radius: 6px;
  width: 260px; height: 22px;
  margin-top: -11px; margin-left: -130px;
}
@keyframes attack-beam {
  0%   { transform: scaleX(0.05) translateX(-30px); opacity: 1; }
  30%  { transform: scaleX(1) translateX(0);         opacity: 0.9; }
  65%  { transform: scaleX(1) translateX(20px);      opacity: 0.55; }
  100% { transform: scaleX(0.1) translateX(60px);    opacity: 0; }
}

/* Shard/explosion animation — rock, ground, steel */
#attack-effect.show.type-rock,
#attack-effect.show.type-ground,
#attack-effect.show.type-steel {
  animation: attack-shards 0.7s ease-out forwards;
  border-radius: 4px;
  width: 32px; height: 32px;
  margin-top: -16px; margin-left: -16px;
}
@keyframes attack-shards {
  0%   { transform: scale(0.1) rotate(0deg);
         box-shadow: 0 0 0 rgba(200,180,100,0); opacity: 1; }
  35%  { transform: scale(1) rotate(20deg);
         box-shadow: -44px -32px 10px rgba(200,180,100,0.8),
                      32px -44px 10px rgba(180,160,80,0.7),
                      48px  22px 10px rgba(200,180,100,0.6),
                     -28px  38px 10px rgba(180,160,80,0.5); opacity: 0.9; }
  100% { transform: scale(2.6) rotate(45deg);
         box-shadow: -80px -60px 0 rgba(200,180,100,0),
                      64px -80px 0 rgba(180,160,80,0),
                      96px  44px 0 rgba(200,180,100,0),
                     -56px  76px 0 rgba(180,160,80,0); opacity: 0; }
}

/* Spiral animation — ghost, dark, poison, bug */
#attack-effect.show.type-ghost,
#attack-effect.show.type-dark,
#attack-effect.show.type-poison,
#attack-effect.show.type-bug {
  animation: attack-spiral 0.75s cubic-bezier(.3,0,.7,1) forwards;
}
@keyframes attack-spiral {
  0%   { transform: scale(0.2) rotate(0deg);   opacity: 0.9; }
  35%  { transform: scale(1.0) rotate(160deg); opacity: 0.85; }
  65%  { transform: scale(1.7) rotate(290deg); opacity: 0.4; }
  100% { transform: scale(2.8) rotate(400deg); opacity: 0; }
}

/* Ring-pulse animation — grass */
#attack-effect.show.type-grass {
  animation: attack-ring 0.65s ease-out forwards;
  background: transparent !important;
  border: 5px solid rgba(60,220,60,0.9);
  box-shadow: 0 0 30px rgba(60,220,60,0.7), inset 0 0 20px rgba(60,220,60,0.3) !important;
}
@keyframes attack-ring {
  0%   { transform: scale(0.1); opacity: 1; border-width: 7px; }
  40%  { transform: scale(1.1); opacity: 0.8; border-width: 4px; }
  70%  { transform: scale(1.9); opacity: 0.4; border-width: 2px; }
  100% { transform: scale(2.8); opacity: 0; border-width: 1px; }
}

/* Color definitions — radial burst types */
#attack-effect.type-fire     { background: radial-gradient(circle, rgba(255,200,0,0.95) 0%, rgba(255,60,0,0.7) 50%, transparent 75%); box-shadow: 0 0 50px rgba(255,80,0,0.9); }
#attack-effect.type-electric { background: radial-gradient(circle, rgba(255,255,100,0.98) 0%, rgba(255,200,0,0.7) 50%, transparent 75%); box-shadow: 0 0 50px rgba(255,220,0,0.9); }
#attack-effect.type-psychic  { background: radial-gradient(circle, rgba(255,140,220,0.95) 0%, rgba(200,0,180,0.7) 50%, transparent 75%); box-shadow: 0 0 50px rgba(220,0,200,0.9); }
#attack-effect.type-fairy    { background: radial-gradient(circle, rgba(255,200,240,0.95) 0%, rgba(255,100,200,0.7) 50%, transparent 75%); box-shadow: 0 0 50px rgba(255,120,220,0.9); }
#attack-effect.type-fighting { background: radial-gradient(circle, rgba(255,120,80,0.95) 0%, rgba(200,20,0,0.7) 50%, transparent 75%); box-shadow: 0 0 50px rgba(220,40,0,0.9); }
#attack-effect.type-normal   { background: radial-gradient(circle, rgba(240,240,220,0.95) 0%, rgba(180,180,160,0.7) 50%, transparent 75%); box-shadow: 0 0 40px rgba(220,220,200,0.8); }
/* Beam types — color via background */
#attack-effect.type-water    { background: linear-gradient(90deg, transparent, rgba(80,180,255,0.95), rgba(0,120,255,0.9), rgba(80,180,255,0.95), transparent); box-shadow: 0 0 30px rgba(0,150,255,0.9); }
#attack-effect.type-ice      { background: linear-gradient(90deg, transparent, rgba(200,240,255,0.95), rgba(80,200,255,0.9), rgba(200,240,255,0.95), transparent); box-shadow: 0 0 30px rgba(120,220,255,0.9); }
#attack-effect.type-flying   { background: linear-gradient(90deg, transparent, rgba(160,210,255,0.95), rgba(80,150,255,0.9), rgba(160,210,255,0.95), transparent); box-shadow: 0 0 30px rgba(120,180,255,0.9); }
#attack-effect.type-dragon   { background: linear-gradient(90deg, transparent, rgba(120,120,255,0.95), rgba(0,0,220,0.9), rgba(120,120,255,0.95), transparent); box-shadow: 0 0 30px rgba(60,60,255,0.9); }
/* Shard types — color via box-shadow (see keyframe) */
#attack-effect.type-rock     { background: rgba(180,140,70,0.9); box-shadow: 0 0 20px rgba(180,140,70,0.8); }
#attack-effect.type-ground   { background: rgba(200,160,70,0.9); box-shadow: 0 0 20px rgba(200,150,50,0.8); }
#attack-effect.type-steel    { background: rgba(190,210,225,0.9); box-shadow: 0 0 20px rgba(170,190,210,0.8); }
/* Spiral types */
#attack-effect.type-ghost    { background: radial-gradient(circle, rgba(140,80,200,0.9) 0%, rgba(80,0,140,0.7) 50%, transparent 75%); box-shadow: 0 0 40px rgba(100,0,180,0.9); }
#attack-effect.type-dark     { background: radial-gradient(circle, rgba(100,70,140,0.9) 0%, rgba(40,20,70,0.85) 60%, transparent 80%); box-shadow: 0 0 40px rgba(70,40,100,0.9); }
#attack-effect.type-poison   { background: radial-gradient(circle, rgba(200,80,220,0.9) 0%, rgba(130,20,160,0.7) 50%, transparent 75%); box-shadow: 0 0 40px rgba(180,40,220,0.9); }
#attack-effect.type-bug      { background: radial-gradient(circle, rgba(160,220,60,0.9) 0%, rgba(80,160,0,0.7) 50%, transparent 75%); box-shadow: 0 0 40px rgba(100,180,20,0.9); }

/* ── Status panels inside arena ──────────────── */
/* Player status: TOP LEFT  (same side as player sprite at bottom-left) */
.battle-status-player {
  position: absolute;
  top: 14px;
  left: 14px;
  min-width: 200px;
  max-width: 240px;
  z-index: 5;   /* below sprites (z-index:12) — sprites always in front */
}
/* Enemy status: TOP RIGHT (same side as enemy sprite at bottom-right) */
.battle-status-enemy {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 200px;
  max-width: 240px;
  z-index: 5;
}
.battle-status-box {
  background: rgba(3, 6, 16, 0.92);
  border: 1px solid rgba(0,212,255,0.20);
  border-radius: var(--radius);
  padding: 10px 14px;
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.6),
    0 0 0 1px rgba(0,0,0,0.4);
}
/* Player box: green accent on LEFT edge */
.battle-status-player .battle-status-box {
  border-left: 3px solid rgba(57,255,143,0.60);
}
/* Enemy box: red accent on RIGHT edge */
.battle-status-enemy .battle-status-box {
  border-right: 3px solid rgba(255,77,109,0.60);
}
.battle-status-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  letter-spacing: 0.3px;
}
.battle-status-level {
  font-size: 11px;
  color: var(--neon-blue);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(0,212,255,0.12);
  padding: 1px 6px;
  border-radius: 8px;
}
.battle-hp-bar {
  margin: 6px 0 2px;
}
.battle-hp-bar .stat-bar {
  height: 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.battle-hp-bar .stat-bar-fill {
  border-radius: 6px;
  box-shadow: 0 0 8px currentColor;
  transition: width 0.5s cubic-bezier(.25,.8,.25,1);
}
.battle-hp-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

/* ── Battle result popup overlay ─────────────── */
#battle-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
#battle-result-overlay.show {
  opacity: 1;
  pointer-events: all;
}
#battle-result-overlay .result-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}
#battle-result-overlay .result-box {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 52px;
  border-radius: 24px;
  border: 2px solid;
  box-shadow: 0 0 80px currentColor, 0 24px 60px rgba(0,0,0,0.7);
  animation: result-pop 0.5s cubic-bezier(.17,.67,.35,1.4) both;
  max-width: 440px;
  width: 90vw;
}
@keyframes result-pop {
  0%   { transform: scale(0.5) translateY(40px); opacity: 0; }
  100% { transform: scale(1)   translateY(0);    opacity: 1; }
}
#battle-result-overlay.win .result-box {
  background: linear-gradient(145deg, rgba(4,18,10,0.97), rgba(6,28,14,0.97));
  border-color: rgba(57,255,143,0.7);
  color: #39ff8f;
}
#battle-result-overlay.lose .result-box {
  background: linear-gradient(145deg, rgba(18,4,8,0.97), rgba(28,6,10,0.97));
  border-color: rgba(255,60,80,0.7);
  color: #ff4d6a;
}
.result-icon { font-size:64px;line-height:1;margin-bottom:12px;display:block;animation:result-icon-bounce 0.6s 0.3s cubic-bezier(.17,.67,.35,1.4) both; }
@keyframes result-icon-bounce { 0%{transform:scale(0) rotate(-15deg);}100%{transform:scale(1) rotate(0deg);} }
.result-title { font-family:'Rajdhani',sans-serif;font-size:34px;font-weight:900;letter-spacing:2px;text-transform:uppercase;margin-bottom:8px; }
.result-subtitle { font-size:15px;opacity:0.8;margin-bottom:22px;color:var(--text-primary); }
.result-rewards { font-size:14px;color:var(--neon-yellow);margin-bottom:18px;font-weight:700; }
.result-close-btn { padding:10px 32px;border-radius:12px;border:2px solid currentColor;background:transparent;color:inherit;font-family:'Rajdhani',sans-serif;font-size:15px;font-weight:700;cursor:pointer;letter-spacing:1px;transition:background .2s; }
.result-close-btn:hover { background:rgba(255,255,255,0.1); }
/* Confetti */
.confetti-piece { position:fixed;width:10px;height:12px;top:-20px;border-radius:2px;animation:confetti-fall linear forwards;z-index:9100;pointer-events:none; }
@keyframes confetti-fall { 0%{transform:translateY(0) rotateZ(0deg);opacity:1;}80%{opacity:1;}100%{transform:translateY(110vh) rotateZ(720deg);opacity:0;} }

/* ── Battle log ───────────────────────────────── */
.battle-log {
  background: rgba(4, 7, 18, 0.97);
  border-top: 1px solid rgba(0,212,255,0.18);
  padding: 14px 22px;
  min-height: 72px;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}
.battle-log-text {
  animation: fade-in 0.3s ease-out;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Attack buttons panel ─────────────────────── */
.battle-actions {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(5, 8, 20, 0.98);
  border-top: 1px solid rgba(0,212,255,0.12);
}
.battle-actions-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attack-btn {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(.25,.8,.25,1);
  text-align: left;
  font-family: 'Exo 2', sans-serif;
  text-decoration: none;
  min-height: 58px;
  overflow: hidden;
}
.attack-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s;
}
.attack-btn:hover::before { opacity: 1; }
.attack-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.attack-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: none;
}
.attack-btn.fired {
  animation: btn-fire-pulse 0.3s ease-out;
}
@keyframes btn-fire-pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.93); box-shadow: inset 0 0 20px rgba(255,255,255,0.2); }
  100% { transform: scale(1); }
}

/* ── Attack button type colors ────────────────── */
.attack-btn.type-normal   { border-color: rgba(160,160,140,0.35); }
.attack-btn.type-normal::before { background: rgba(160,160,140,0.05); }
.attack-btn.type-normal:hover   { border-color: rgba(200,200,180,0.7); box-shadow: 0 4px 20px rgba(160,160,140,0.2); }

.attack-btn.type-fire     { border-color: rgba(255,100,0,0.4); }
.attack-btn.type-fire::before   { background: rgba(255,80,0,0.07); }
.attack-btn.type-fire:hover     { border-color: rgba(255,140,0,0.8); box-shadow: 0 4px 24px rgba(255,80,0,0.3); }

.attack-btn.type-water    { border-color: rgba(0,140,255,0.4); }
.attack-btn.type-water::before  { background: rgba(0,120,255,0.07); }
.attack-btn.type-water:hover    { border-color: rgba(60,180,255,0.8); box-shadow: 0 4px 24px rgba(0,140,255,0.3); }

.attack-btn.type-electric { border-color: rgba(255,210,0,0.4); }
.attack-btn.type-electric::before { background: rgba(255,200,0,0.07); }
.attack-btn.type-electric:hover   { border-color: rgba(255,230,60,0.8); box-shadow: 0 4px 24px rgba(255,200,0,0.3); }

.attack-btn.type-grass    { border-color: rgba(60,200,60,0.4); }
.attack-btn.type-grass::before  { background: rgba(40,180,40,0.07); }
.attack-btn.type-grass:hover    { border-color: rgba(80,230,80,0.8); box-shadow: 0 4px 24px rgba(40,200,40,0.3); }

.attack-btn.type-ice      { border-color: rgba(100,220,255,0.4); }
.attack-btn.type-ice::before    { background: rgba(80,200,255,0.07); }
.attack-btn.type-ice:hover      { border-color: rgba(140,240,255,0.8); box-shadow: 0 4px 24px rgba(80,220,255,0.3); }

.attack-btn.type-fighting { border-color: rgba(220,60,0,0.4); }
.attack-btn.type-fighting::before { background: rgba(200,40,0,0.07); }
.attack-btn.type-fighting:hover   { border-color: rgba(255,80,40,0.8); box-shadow: 0 4px 24px rgba(220,40,0,0.3); }

.attack-btn.type-poison   { border-color: rgba(180,60,220,0.4); }
.attack-btn.type-poison::before { background: rgba(160,40,200,0.07); }
.attack-btn.type-poison:hover   { border-color: rgba(220,100,255,0.8); box-shadow: 0 4px 24px rgba(180,40,220,0.3); }

.attack-btn.type-ground   { border-color: rgba(200,160,60,0.4); }
.attack-btn.type-ground::before { background: rgba(180,130,40,0.07); }
.attack-btn.type-ground:hover   { border-color: rgba(230,190,80,0.8); box-shadow: 0 4px 24px rgba(200,150,40,0.3); }

.attack-btn.type-rock     { border-color: rgba(180,150,80,0.4); }
.attack-btn.type-rock::before   { background: rgba(160,130,60,0.07); }
.attack-btn.type-rock:hover     { border-color: rgba(210,180,100,0.8); box-shadow: 0 4px 24px rgba(160,130,60,0.3); }

.attack-btn.type-bug      { border-color: rgba(130,200,40,0.4); }
.attack-btn.type-bug::before    { background: rgba(100,180,20,0.07); }
.attack-btn.type-bug:hover      { border-color: rgba(160,230,60,0.8); box-shadow: 0 4px 24px rgba(100,180,20,0.3); }

.attack-btn.type-ghost    { border-color: rgba(100,60,200,0.4); }
.attack-btn.type-ghost::before  { background: rgba(80,40,180,0.07); }
.attack-btn.type-ghost:hover    { border-color: rgba(140,100,255,0.8); box-shadow: 0 4px 24px rgba(100,40,200,0.3); }

.attack-btn.type-dragon   { border-color: rgba(60,80,255,0.4); }
.attack-btn.type-dragon::before { background: rgba(40,60,255,0.07); }
.attack-btn.type-dragon:hover   { border-color: rgba(100,120,255,0.8); box-shadow: 0 4px 24px rgba(60,80,255,0.3); }

.attack-btn.type-dark     { border-color: rgba(80,60,100,0.4); }
.attack-btn.type-dark::before   { background: rgba(60,40,80,0.07); }
.attack-btn.type-dark:hover     { border-color: rgba(120,90,150,0.8); box-shadow: 0 4px 24px rgba(80,40,120,0.3); }

.attack-btn.type-steel    { border-color: rgba(160,180,200,0.4); }
.attack-btn.type-steel::before  { background: rgba(140,160,180,0.07); }
.attack-btn.type-steel:hover    { border-color: rgba(200,220,240,0.8); box-shadow: 0 4px 24px rgba(160,180,200,0.3); }

.attack-btn.type-fairy    { border-color: rgba(255,140,210,0.4); }
.attack-btn.type-fairy::before  { background: rgba(255,120,200,0.07); }
.attack-btn.type-fairy:hover    { border-color: rgba(255,180,235,0.8); box-shadow: 0 4px 24px rgba(255,120,200,0.3); }

.attack-btn.type-psychic  { border-color: rgba(255,80,180,0.4); }
.attack-btn.type-psychic::before { background: rgba(255,60,160,0.07); }
.attack-btn.type-psychic:hover   { border-color: rgba(255,120,210,0.8); box-shadow: 0 4px 24px rgba(255,60,180,0.3); }

.attack-btn.type-flying   { border-color: rgba(120,180,255,0.4); }
.attack-btn.type-flying::before { background: rgba(100,160,255,0.07); }
.attack-btn.type-flying:hover   { border-color: rgba(160,210,255,0.8); box-shadow: 0 4px 24px rgba(100,160,255,0.3); }

.attack-btn:not([class*="type-"]) { border-color: var(--border-subtle); }
.attack-btn:not([class*="type-"]):hover { border-color: var(--border-glow); }

.attack-btn-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  text-align: left;
  letter-spacing: 0.2px;
}
.attack-btn-pp {
  font-size: 10px;
  color: var(--text-muted);
}
.attack-btn-type {
  flex-shrink: 0;
  font-size: 9px;
}

/* ── Battle extra actions (legacy compat) ────── */
.battle-extra-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  grid-column: 1 / -1;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   NEW BATTLE BOTTOM UI — TAB SYSTEM
   ═══════════════════════════════════════════════ */
.battle-ui-bottom {
  background: rgba(4, 7, 18, 0.99);
  border-top: 1px solid rgba(0,212,255,0.15);
}

/* ── Tab bar ──────────────────────────────────── */
.battle-tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgba(0,212,255,0.08);
}
.battle-tab {
  padding: 9px 4px 7px;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(0,212,255,0.06);
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  outline: none;
}
.battle-tab:last-child { border-right: none; }
.battle-tab .tab-icon { font-size: 15px; line-height: 1; }
.battle-tab:hover:not(.tab-locked) {
  background: rgba(0,212,255,0.07);
  color: rgba(255,255,255,0.75);
}
.battle-tab.active {
  background: rgba(0,212,255,0.10);
  color: var(--neon-cyan);
  border-bottom: 2px solid var(--neon-cyan);
}
.battle-tab.tab-run-active { color: var(--neon-red); border-bottom-color: var(--neon-red); background: rgba(255,60,60,0.07); }
.battle-tab.tab-locked { opacity: 0.25; pointer-events: none; cursor: not-allowed; }

/* ── Tab content panels ───────────────────────── */
.battle-tab-content {
  padding: 12px 14px;
  min-height: 140px;
}
.battle-tab-panel.hidden { display: none !important; }
.battle-tab-panel.tab-highlight {
  animation: tab-panel-flash 0.7s ease-out;
}
@keyframes tab-panel-flash {
  0%, 100% { background: transparent; }
  25%       { background: rgba(255,60,60,0.10); }
  50%       { background: rgba(255,60,60,0.06); }
}
.battle-tab.tab-highlight-pulse {
  animation: tab-btn-pulse 0.6s ease-out;
}
@keyframes tab-btn-pulse {
  0%   { background: rgba(0,212,255,0.05); }
  30%  { background: rgba(0,212,255,0.25); border-color: var(--neon-cyan); }
  100% { background: rgba(0,212,255,0.05); }
}

/* ── Attack grid (FIGHT tab) ──────────────────── */
.battle-attacks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Party grid (POKEMON tab) ─────────────────── */
.party-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.party-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s;
  min-height: 58px;
  overflow: hidden;
}
.party-card:hover:not(.party-fainted):not(.party-active):not(.party-egg) {
  background: rgba(0,212,255,0.08);
  border-color: rgba(0,212,255,0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,212,255,0.15);
}
.party-card.party-active {
  border-color: rgba(57,255,143,0.55);
  background: rgba(57,255,143,0.06);
  cursor: default;
}
.party-card.party-fainted {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.party-card.party-egg { cursor: not-allowed; opacity: 0.55; }
.party-icon-img {
  width: 36px; height: 36px;
  image-rendering: pixelated;
  flex-shrink: 0;
  object-fit: contain;
}
.party-card-info { flex: 1; min-width: 0; }
.party-card-name {
  font-size: 11px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.party-in-battle-badge {
  font-size: 8px; background: rgba(57,255,143,0.2); color: #39ff8f;
  border-radius: 4px; padding: 1px 4px; flex-shrink: 0;
}
.party-card-level { font-size: 9px; color: var(--text-muted); margin-bottom: 2px; }
.party-hp-bar-wrap { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; margin-top: 2px; }
.party-hp-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #39ff8f, #00d4ff);
  transition: width 0.5s;
}
.party-hp-bar-fill.low { background: linear-gradient(90deg, #ff4400, #ff8800); }
.party-card-hp-text { font-size: 9px; color: var(--text-dim); margin-top: 1px; }
.party-fainted-x {
  position: absolute; top: 4px; right: 6px;
  font-size: 13px; color: var(--neon-red); font-weight: 900; line-height: 1;
}

/* ── Bag panel ────────────────────────────────── */
.bag-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.bag-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 6px; min-width: 60px; max-width: 72px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); cursor: pointer; transition: all 0.15s;
  text-align: center;
}
.bag-item:hover:not(.bag-empty) {
  background: rgba(0,212,255,0.08);
  border-color: rgba(0,212,255,0.45);
  transform: translateY(-1px);
}
.bag-empty { opacity: 0.3; cursor: not-allowed; }
.bag-item-icon { width: 28px; height: 28px; image-rendering: pixelated; object-fit: contain; }
.bag-item-name { font-size: 9px; color: var(--text-muted); line-height: 1.2; }
.bag-item-count {
  font-size: 10px; font-weight: 700; color: var(--neon-cyan);
  background: rgba(0,212,255,0.12); border-radius: 8px; padding: 0 5px;
}

/* Potion target picker (inside bag panel) */
#potion-picker { margin-top: 10px; padding: 10px; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); background: rgba(255,255,255,0.03); }
.potion-picker-title { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.potion-targets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.potion-target {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  cursor: pointer; transition: all 0.15s; font-size: 11px;
}
.potion-target:hover { border-color: rgba(57,255,143,0.5); background: rgba(57,255,143,0.06); }
.potion-target.selected { border-color: var(--neon-green); background: rgba(57,255,143,0.08); }

/* ── Run panel ────────────────────────────────── */
.run-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; text-align: center; }
.run-panel p { margin: 0; }
.run-warn { font-size: 15px; font-weight: 700; color: var(--neon-red); }
.run-note { font-size: 11px; color: var(--text-muted); }

/* ── Tab-locked state ─────────────────────────── */
@keyframes tab-panel-flash { 0%,100%{background:transparent}25%{background:rgba(255,60,60,0.12)}60%{background:rgba(255,60,60,0.05)} }

/* ── Pokemon Grid ── */
.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.pokemon-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}
.pokemon-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,212,255,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.pokemon-card:hover::before { opacity: 1; }
.pokemon-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-neon);
}
.pokemon-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  image-rendering: pixelated;
  margin-bottom: 8px;
}
.pokemon-card-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pokemon-card-level {
  font-size: 12px;
  color: var(--neon-blue);
  font-weight: 600;
}

/* ── Pokémon detail HP bar compact ── */
.hp-mini { margin: 6px 0; }
.hp-mini .stat-bar { height: 5px; }

/* ── Party strip (sidebar) ── */
.party-strip { display: flex; flex-direction: column; gap: 8px; }
.party-mon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: var(--transition);
}
.party-mon:hover { border-color: var(--border-glow); background: rgba(0,212,255,0.04); }
.party-mon img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.party-mon-info { flex: 1; min-width: 0; }
.party-mon-name { font-size: 12px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party-mon-level { font-size: 11px; color: var(--neon-blue); }

/* ── Login / Register ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--gradient-main);
  background-image:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(168,85,247,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 70% 80%, rgba(0,212,255,0.10) 0%, transparent 60%),
    var(--gradient-main);
}
.auth-box {
  width: 100%;
  max-width: 420px;
  background: rgba(10, 16, 35, 0.95);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-neon), 0 30px 80px rgba(0,0,0,0.7);
  backdrop-filter: blur(20px);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}
.auth-tabs {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  text-decoration: none;
}
.auth-tab.active {
  background: rgba(0, 212, 255, 0.15);
  color: var(--neon-blue);
}

/* ── Misc ── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-neon   { color: var(--neon-blue); }
.text-cyan   { color: var(--neon-cyan); }
.text-purple { color: var(--neon-purple); }
.text-yellow { color: var(--neon-yellow); }
.text-red    { color: var(--neon-red); }
.text-green  { color: var(--neon-green); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.fw-bold { font-weight: 700; }

/* Shiny glow for shiny pokemon */
.shiny-glow {
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 16px rgba(255, 215, 0, 0.4));
}

/* Online indicator */
.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green);
  display: inline-block;
  flex-shrink: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.4); }

/* ── Responsive tweaks ── */
@media (max-width: 600px) {
  .battle-actions { grid-template-columns: 1fr 1fr; }
  .battle-actions-split { grid-template-columns: 1fr 1fr; }
  .pokemon-grid { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 16px 12px; }
}

/* ── Legacy overrides ── (so old PHP output still looks ok) ── */
table.dialog { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); border-collapse: separate; overflow: hidden; }
table.dialog th, table.dialog td { padding: 8px 12px; color: var(--text-primary); font-size: 13px; border-bottom: 1px solid var(--border-subtle); }
table.dialog tr:last-child td, table.dialog tr:last-child th { border-bottom: none; }
center { text-align: center; }
a { color: var(--neon-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--neon-cyan); }
img { max-width: 100%; }
input[type="text"], input[type="password"], input[type="email"], select, textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: 'Exo 2', sans-serif;
  outline: none;
  transition: var(--transition);
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(0,212,255,0.1);
}
input[type="submit"], input[type="button"], button {
  cursor: pointer;
  padding: 9px 18px;
  background: linear-gradient(135deg, #0088cc, #0044aa);
  border: 1px solid rgba(0,212,255,0.4);
  border-radius: 8px;
  color: #fff;
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
}
input[type="submit"]:hover, input[type="button"]:hover, button:hover {
  background: linear-gradient(135deg, #00aaff, #0055cc);
  box-shadow: 0 4px 14px rgba(0,170,255,0.4);
}
strong, b { color: var(--text-primary); }
h1, h2, h3, h4 {
  font-family: 'Rajdhani', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
}
h1 { font-size: 26px; color: var(--neon-blue); margin-bottom: 16px; }
h2 { font-size: 20px; margin-bottom: 12px; }
h3 { font-size: 17px; margin-bottom: 10px; }
h4 { font-size: 15px; margin-bottom: 8px; }
hr { border: none; border-top: 1px solid var(--border-subtle); margin: 16px 0; }
ul, ol { padding-left: 20px; color: var(--text-primary); }
p { margin-bottom: 10px; color: var(--text-primary); }
.dialog { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }

/* ── Legacy PHP class compatibility ─────────────────────────────── */
/* These classes are used by non-rewritten legacy pages */

/* Table cells */
.normal_td, .normal_first_td, .top_td, .top_first_td {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.top_td, .top_first_td {
  background: rgba(0, 212, 255, 0.06);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}
table { border-collapse: collapse; width: 100%; max-width: 700px; }
table td { border-bottom: 1px solid var(--border-subtle); }
table tr:hover td { background: rgba(255,255,255,0.02); }

/* Coloured message divs */
.green { background: rgba(57,255,143,.08); border:1px solid rgba(57,255,143,.25); border-radius: 8px; padding:10px 14px; color: var(--neon-green); margin: 8px 0; }
.red   { background: rgba(255,77,109,.08); border:1px solid rgba(255,77,109,.25); border-radius: 8px; padding:10px 14px; color: var(--neon-red);   margin: 8px 0; }
.blue  { background: rgba(0,212,255,.08);  border:1px solid rgba(0,212,255,.25);  border-radius: 8px; padding:10px 14px; color: var(--neon-blue);  margin: 8px 0; }
.orange{ background: rgba(255,170,0,.08);  border:1px solid rgba(255,170,0,.25);  border-radius: 8px; padding:10px 14px; color: var(--neon-yellow); margin: 8px 0; }
.ok    { background: rgba(57,255,143,.08); border:1px solid rgba(57,255,143,.25); border-radius: 8px; padding:10px 14px; color: var(--neon-green); margin: 8px 0; }
.error, .error_red { background: rgba(255,77,109,.08); border:1px solid rgba(255,77,109,.25); border-radius: 8px; padding:10px 14px; color: var(--neon-red); margin: 8px 0; }
.info  { background: rgba(0,212,255,.06);  border:1px solid rgba(0,212,255,.15);  border-radius: 8px; padding:10px 14px; color: var(--text-muted);  margin: 8px 0; }

/* Profile boxes (legacy layout compat) */
.boxp  { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px; margin: 8px 0; }
.boxw  { background: rgba(57,255,143,.07); border: 1px solid rgba(57,255,143,.25); border-radius: var(--radius); padding: 10px; margin: 8px 0; text-align:center; }
.boxl  { background: rgba(255,77,109,.07); border: 1px solid rgba(255,77,109,.25); border-radius: var(--radius); padding: 10px; margin: 8px 0; text-align:center; }

/* Old HP bar */
.bar_red { height: 10px; background: rgba(255,255,255,.1); border-radius: 999px; overflow:hidden; }
.bar_red .progress { height: 100%; background: linear-gradient(90deg,var(--neon-green),#28d868); border-radius: 999px; transition:.3s; }

/* Button styles */
.button, .button_mini { display:inline-block; padding: 7px 16px; border-radius: 8px; background: linear-gradient(135deg, var(--neon-blue), #0088cc); color: #000; font-weight: 700; font-size: 12px; cursor: pointer; border: none; transition: .2s; }
.button:hover, .button_mini:hover { opacity:.85; transform:translateY(-1px); }
input[type="submit"].button_mini, input[type="submit"].button { padding: 7px 16px; border-radius: 8px; background: linear-gradient(135deg, var(--neon-blue), #0088cc); color: #000; font-weight: 700; border: none; cursor: pointer; }

/* Row / col layout */
.row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.col1 { flex: 1; min-width: 180px; }
.col2 { flex: 1; min-width: 180px; }

/* Text styles */
.h1text { font-size: 20px; font-weight: 800; color: var(--neon-blue); margin-bottom: 12px; font-family: 'Rajdhani', sans-serif; }
.smalltext { font-size: 11px; color: var(--text-dim); }
.text_long { word-break: break-word; }
.text_select { color: var(--neon-cyan); font-weight: 600; }

/* Type badges (legacy .type class) */
.type { display:inline-block; padding:2px 6px; border-radius:4px; font-size:10px; font-weight:700; text-transform:uppercase; }
.type.normal, .type-normal   { background:rgba(168,168,120,.2); color:#aaa878; }
.type.fire, .type-fire       { background:rgba(240,128,48,.2);  color:#f08030; }
.type.water, .type-water     { background:rgba(104,144,240,.2); color:#6890f0; }
.type.electric, .type-electric{background:rgba(248,208,48,.2);  color:#f8d030; }
.type.grass, .type-grass     { background:rgba(120,200,80,.2);  color:#78c850; }
.type.ice, .type-ice         { background:rgba(152,216,216,.2); color:#98d8d8; }
.type.fighting, .type-fighting{background:rgba(192,48,40,.2);   color:#c03028; }
.type.poison, .type-poison   { background:rgba(160,64,160,.2);  color:#a040a0; }
.type.ground, .type-ground   { background:rgba(224,192,104,.2); color:#e0c068; }
.type.flying, .type-flying   { background:rgba(168,144,240,.2); color:#a890f0; }
.type.psychic, .type-psychic { background:rgba(248,88,136,.2);  color:#f85888; }
.type.bug, .type-bug         { background:rgba(168,184,32,.2);  color:#a8b820; }
.type.rock, .type-rock       { background:rgba(184,160,56,.2);  color:#b8a038; }
.type.ghost, .type-ghost     { background:rgba(112,88,152,.2);  color:#705898; }
.type.dragon, .type-dragon   { background:rgba(112,56,248,.2);  color:#7038f8; }
.type.dark, .type-dark       { background:rgba(112,88,72,.2);   color:#705848; }
.type.steel, .type-steel     { background:rgba(184,184,208,.2); color:#b8b8d0; }
.type.fairy, .type-fairy     { background:rgba(238,153,172,.2); color:#ee99ac; }

/* Pagination / sabrosus */
.sabrosus { display:flex; gap:4px; align-items:center; justify-content:center; flex-wrap:wrap; padding:8px 0; }
.sabrosus a, .sabrosus span { padding:4px 10px; border-radius:6px; font-size:12px; text-decoration:none; }
.sabrosus a { background:rgba(255,255,255,.06); color:var(--text-muted); }
.sabrosus a:hover { background:rgba(0,212,255,.15); color:var(--neon-blue); }
.sabrosus .current { background:var(--neon-blue); color:#000; font-weight:700; }
.sabrosus .disabled { background:rgba(255,255,255,.03); color:var(--text-dim); }

/* Tooltip */
#tooltip { position:absolute; border:1px solid var(--border-subtle); background:var(--bg-card); padding:6px 10px; color:var(--text-primary); display:none; border-radius:8px; font-size:12px; z-index:1000; max-width:200px; }

/* Center alignment */
center { text-align: center; }

/* Image alignment */
.imglower { vertical-align: middle; }

/* Bubble (chat/forum) */
.bubble { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }

/* tder (transfer list row) */
.tder { padding:6px 8px; background:rgba(255,255,255,0.03); border:1px solid var(--border-subtle); font-size:12px; color:var(--text-muted); text-align:center; }

/* Market item card */
.marktbg { background:rgba(255,255,255,0.04); border:1px solid var(--border-subtle); border-radius:10px; overflow:hidden; transition:.2s; }
.marktbg:hover { border-color:var(--neon-cyan); background:rgba(0,212,255,0.06); }
.marktbg td { padding:4px 6px; text-align:center; }

/* Short text input (market qty) */
.text_short { width:40px; padding:4px 6px; text-align:center; border-radius:6px; background:rgba(255,255,255,0.06); border:1px solid var(--border-subtle); color:var(--text-primary); font-size:12px; }

/* niceblock - used by bank and some other pages */
.niceblock { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }

/* Old font tags - normalize */
font[size="4"] { font-size: 16px; }
font[size="3"] { font-size: 14px; }
font[size="2"] { font-size: 12px; }
font[size="1"] { font-size: 11px; }

/* Center wrapper */
center > br { display: block; height: 8px; }

/* Forms */
input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea, select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 13px;
  width: 100%;
  max-width: 340px;
  outline: none;
  transition: .2s;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus,
input[type="password"]:focus, textarea:focus, select:focus {
  border-color: var(--neon-blue);
  background: rgba(0,212,255,0.05);
}
label { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 4px; }
