/* ========================================================
   DRAGON BALL KI CLASH - STYLESHEET
   Anime-inspired, High Polish, Mobile-Touch Optimized
   ======================================================== */

:root {
  --bg-dark: #0f121d;
  --bg-card: #1a1e30;
  --gold-primary: #ffcc00;
  --gold-glow: rgba(255, 204, 0, 0.6);
  --orange-saiyan: #ff6600;
  --blue-ki: #00d2ff;
  --blue-ki-glow: rgba(0, 210, 255, 0.5);
  --purple-villain: #b537f2;
  --red-damage: #ff3366;
  --green-heal: #2ecc71;
  --font-comic: 'Bangers', cursive, sans-serif;
  --font-ui: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Anime Obsidian & Luminous Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 14, 25, 0.85);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #2b395b;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffcc00, #ff6600);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

body {
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 20%, #1f2742 0%, #0c0e17 80%);
  color: #fff;
  font-family: var(--font-ui);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Screen Shake Effect */
.shake {
  animation: screen-shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screen-shake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 2px, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, -4px, 0); }
  40%, 60% { transform: translate3d(6px, 4px, 0); }
}

/* ========================================================
   TOP HEADER & PHASE TRACKER
   ======================================================== */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(10, 13, 22, 0.85);
  border-bottom: 2px solid #2d3748;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dragon-ball-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--gold-primary));
}

.game-title {
  font-family: var(--font-comic);
  font-size: 1.6rem;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  text-shadow: 2px 2px 0px #000, 0 0 10px var(--orange-saiyan);
}

.subtitle {
  font-size: 0.75rem;
  font-weight: 800;
  background: #ff4757;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.header-controls {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: #252b42;
  border: 1px solid #3e4a6d;
  color: #fff;
  font-size: 1.1rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #3e4a6d;
  transform: translateY(-2px);
}

/* Phase Tracker Bar */
.phase-bar {
  display: flex;
  background: #141824;
  border-bottom: 1px solid #2a3148;
  overflow-x: auto;
  white-space: nowrap;
  padding: 4px 8px;
  gap: 6px;
  justify-content: center;
}

.phase-step {
  font-size: 0.7rem;
  font-weight: 700;
  color: #718096;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.3s;
  text-transform: uppercase;
}

.phase-step.active {
  background: linear-gradient(90deg, var(--orange-saiyan), var(--gold-primary));
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 14px var(--gold-glow), 0 0 25px rgba(255, 102, 0, 0.4);
  transform: scale(1.06);
  animation: phaseStepPulse 1.8s infinite alternate ease-in-out;
  letter-spacing: 0.5px;
}

@keyframes phaseStepPulse {
  0% { box-shadow: 0 0 8px var(--gold-glow); }
  100% { box-shadow: 0 0 18px rgba(255, 204, 0, 0.95), 0 0 30px rgba(255, 102, 0, 0.6); }
}

/* ========================================================
   OVERLAYS & MENUS
   ======================================================== */
.screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  padding: 16px;
  overflow-y: auto;
}

.hidden {
  display: none !important;
}

.menu-card {
  background: #191e30;
  border: 2px solid #394469;
  border-radius: 16px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--gold-glow);
  position: relative;
}

.title-banner {
  margin-bottom: 24px;
}

.hero-text {
  font-family: var(--font-comic);
  font-size: 3rem;
  letter-spacing: 2px;
  color: #ff4757;
  text-shadow: 3px 3px 0 #000, 0 0 20px #ff4757;
  line-height: 1;
}

.sub-hero-text {
  font-family: var(--font-comic);
  font-size: 3.8rem;
  color: var(--gold-primary);
  text-shadow: 4px 4px 0 #000, 0 0 25px var(--orange-saiyan);
  line-height: 1;
  margin-bottom: 8px;
}

.tagline {
  color: #a0aec0;
  font-size: 0.95rem;
  font-weight: 600;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-btn.primary {
  background: linear-gradient(135deg, #ff9900, #ff5500);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

.menu-btn.secondary {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
}

.menu-btn.tertiary {
  background: linear-gradient(135deg, #7b2cbf, #5a189a);
  color: #fff;
  box-shadow: 0 4px 15px rgba(123, 44, 191, 0.4);
}

.menu-btn:hover, .menu-btn:active {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.1);
}

.btn-icon-large {
  font-size: 2rem;
}

.btn-text {
  display: flex;
  flex-direction: column;
}

.btn-main {
  font-weight: 800;
  font-size: 1.15rem;
}

.btn-sub {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Deck Selector */
.deck-selector-box {
  background: #111522;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid #28304a;
}

.deck-selector-box label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #8fa0c0;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.deck-options {
  display: flex;
  gap: 8px;
}

.deck-choice-btn {
  flex: 1;
  background: #1f2538;
  border: 2px solid transparent;
  color: #cbd5e0;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.deck-choice-btn.active {
  border-color: var(--gold-primary);
  background: #2b3552;
  color: var(--gold-primary);
}

.mobile-wifi-info {
  font-size: 0.8rem;
  color: #718096;
}

/* ========================================================
   LOBBY & QR CODE
   ======================================================== */
.lobby-card {
  max-width: 600px;
}

.lobby-columns {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

@media (max-width: 580px) {
  .lobby-columns {
    flex-direction: column;
  }
}

.lobby-column {
  flex: 1;
  background: #111422;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2a334d;
}

.qr-container img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  margin: 10px auto;
  display: block;
  border: 4px solid #fff;
}

.url-text {
  font-size: 0.75rem;
  color: var(--blue-ki);
  font-weight: 700;
  word-break: break-all;
}

.room-action-tabs {
  display: flex;
  margin-bottom: 10px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 6px;
  background: #1e2438;
  border: none;
  color: #a0aec0;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--orange-saiyan);
  color: #fff;
}

.pin-display {
  margin-top: 12px;
  padding: 10px;
  background: #1b2238;
  border-radius: 8px;
}

.pin-display strong {
  display: block;
  font-family: var(--font-comic);
  font-size: 2.2rem;
  color: var(--gold-primary);
  letter-spacing: 4px;
}

.pulse-text {
  font-size: 0.8rem;
  color: #8fa0c0;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

#input-room-code {
  width: 100%;
  padding: 12px;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #3c496d;
  background: #0f1320;
  color: #fff;
  letter-spacing: 4px;
  margin-bottom: 10px;
  font-family: var(--font-comic);
}

.btn-small {
  background: transparent;
  border: 1px solid #4a5568;
  color: #a0aec0;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

/* Rules Modal */
.rules-card {
  background: #181d2d;
  border: 2px solid #3e4c73;
  border-radius: 16px;
  max-width: 600px;
  padding: 24px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.rules-scroll-content {
  overflow-y: auto;
  margin: 16px 0;
  text-align: left;
  padding-right: 8px;
}

.rule-item {
  background: #121524;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 4px solid var(--orange-saiyan);
}

.rule-item h3 {
  color: var(--gold-primary);
  font-size: 1rem;
  margin-bottom: 4px;
}

.rule-item p, .rule-item ul {
  font-size: 0.85rem;
  color: #cbd5e0;
  line-height: 1.4;
}

.rule-item ul {
  padding-left: 18px;
  margin-top: 6px;
}

/* ========================================================
   BATTLE BOARD LAYOUT
   ======================================================== */
.battle-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: calc(100vh - 85px);
  position: relative;
  overflow: hidden;
}

.player-zone {
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
}

.opponent-zone {
  background: rgba(22, 16, 32, 0.4);
  border-bottom: 1px solid #23283c;
  flex: 0 0 auto;
}

.player-zone-main {
  background: rgba(16, 24, 38, 0.4);
  border-top: 1px solid #23283c;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Player HUD Bar */
.player-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-avatar {
  font-size: 1.6rem;
  background: #1b2133;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold-primary);
}

.hud-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
}

.hud-faction {
  font-size: 0.65rem;
  color: #8fa0c0;
}

.hud-center {
  flex: 1;
  max-width: 220px;
}

.life-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.life-label {
  font-family: var(--font-comic);
  font-size: 0.85rem;
  color: var(--red-damage);
}

.life-bar-bg {
  flex: 1;
  height: 14px;
  background: #151926;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #3b4566;
}

.life-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  transition: width 0.3s ease;
}

.life-bar-fill.opp-fill {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.life-value {
  font-family: var(--font-comic);
  font-size: 1rem;
  color: #fff;
  min-width: 45px;
  text-align: right;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ki-counter-badge {
  background: #172338;
  border: 1px solid var(--blue-ki);
  color: var(--blue-ki);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 12px;
  box-shadow: 0 0 6px var(--blue-ki-glow);
}

.deck-count-badge {
  font-size: 0.8rem;
  color: #a0aec0;
}

.quick-emojis {
  display: flex;
  gap: 4px;
}

.btn-emoji {
  background: #20273c;
  border: none;
  font-size: 0.95rem;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}

/* Ki Lands Row */
.ki-zone-row {
  display: flex;
  gap: 6px;
  padding: 4px 0;
  min-height: 38px;
  align-items: center;
  overflow-x: auto;
}

.ki-land-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #172b4d;
  border: 1px solid var(--blue-ki);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #bfeaff;
  transition: all 0.2s;
}

.ki-land-pill.tapped {
  opacity: 0.35;
  filter: grayscale(0.8);
  border-color: #4a5568;
  transform: rotate(-8deg);
}

/* Battlefield Rows */
.battlefield-row {
  display: flex;
  gap: 8px;
  min-height: 142px;
  padding: 4px 0;
  overflow-x: auto;
  align-items: center;
}

/* Center Arena Action Bar & Coach */
.arena-center {
  background: rgba(11, 14, 24, 0.9);
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #23283c;
  border-bottom: 1px solid #23283c;
  z-index: 20;
}

.coach-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.coach-icon {
  font-size: 1.1rem;
}

.action-controls-bar {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s;
}

.action-btn.attack-btn {
  background: linear-gradient(90deg, #ff4757, #ff6b81);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

.action-btn.block-btn {
  background: linear-gradient(90deg, #1e90ff, #70a1ff);
  color: #fff;
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.5);
}

.action-btn.end-btn {
  background: linear-gradient(90deg, #2ed573, #7bed9f);
  color: #0b1f13;
  font-weight: 900;
}

.action-btn.fusion-btn {
  background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6, #3b82f6);
  background-size: 300% 300%;
  color: #fff;
  font-weight: 900;
  animation: fusionAuraMove 2.5s ease infinite alternate;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.9), 0 0 28px rgba(236, 72, 153, 0.6);
  letter-spacing: 0.5px;
}

@keyframes fusionAuraMove {
  0% { background-position: 0% 50%; box-shadow: 0 0 14px rgba(245, 158, 11, 0.8); }
  50% { background-position: 100% 50%; box-shadow: 0 0 25px rgba(236, 72, 153, 0.9); }
  100% { background-position: 0% 50%; box-shadow: 0 0 14px rgba(59, 130, 246, 0.8); }
}

.action-btn:hover {
  transform: scale(1.05);
}

/* ========================================================
   CARD DESIGN (AUTHENTIC TRADING CARD STYLING)
   ======================================================== */
.card {
  width: 90px;
  height: 132px;
  background: #1a2035;
  border-radius: 9px;
  border: 2px solid #3c486e;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 4px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

/* Card In Hand */
.hand-container {
  display: flex;
  gap: 8px;
  padding: 8px 6px;
  overflow-x: auto;
  min-height: 155px;
  align-items: flex-end;
}

.hand-container .card {
  width: 94px;
  height: 138px;
}

.hand-container .card:hover, .hand-container .card:focus {
  transform: translateY(-20px) scale(1.18);
  z-index: 50;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9), 0 0 15px var(--gold-glow);
}

/* Playable Aura Glow */
.card.playable {
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px var(--gold-glow);
  animation: glow-pulse 1.8s infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--gold-glow); }
  50% { box-shadow: 0 0 20px rgba(255, 204, 0, 0.95); }
}

/* Card Elements */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.card-cost {
  background: linear-gradient(135deg, #00d2ff, #0088cc);
  color: #000;
  font-family: var(--font-comic);
  font-size: 0.85rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: 1.5px solid #fff;
  box-shadow: 0 0 6px rgba(0, 210, 255, 0.8);
}

.card-type-icon {
  font-size: 0.7rem;
  color: #8fa0c0;
}

.card-art-frame {
  width: 100%;
  height: 64px;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: radial-gradient(circle, #25314f 0%, #0c101d 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1px 0;
}

.card-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.25s ease;
}

.card:hover .card-art-img {
  transform: scale(1.08);
}

.card-art-fallback {
  font-size: 1.8rem;
  text-align: center;
}

.card-name {
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  margin: 1px 0;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-comic);
  font-size: 0.75rem;
}

.stat-box {
  padding: 1px 4px;
  border-radius: 4px;
}

.stat-atk {
  background: rgba(255, 71, 87, 0.3);
  color: #ff6b81;
  border: 1px solid #ff4757;
}

.stat-def {
  background: rgba(46, 204, 113, 0.3);
  color: #2ecc71;
  border: 1px solid #27ae60;
}

/* Card Types Borders */
.card.type-land {
  background: linear-gradient(180deg, #102a45 0%, #0d1a2d 100%);
  border-color: #00d2ff;
}

.card.type-technique {
  background: linear-gradient(180deg, #3d1b54 0%, #1e112b 100%);
  border-color: #a855f7;
}

.card.type-reaction {
  background: linear-gradient(180deg, #543b10 0%, #2b1d07 100%);
  border-color: #f59e0b;
}

/* Tapped State (MTG 45°/90° tilt) */
.card.tapped {
  transform: rotate(45deg) scale(0.9);
  opacity: 0.65;
  filter: grayscale(0.5);
  cursor: not-allowed;
}

.card.tapped::after {
  content: 'TAPPED';
  position: absolute;
  top: 40%;
  left: 5%;
  right: 5%;
  background: rgba(0, 0, 0, 0.8);
  color: #ffcc00;
  font-family: var(--font-comic);
  font-size: 0.65rem;
  text-align: center;
  border-radius: 4px;
}

/* Card Summoning Entrance Pop */
.card.card-summon-in {
  animation: cardSummonPop 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes cardSummonPop {
  0% { opacity: 0; transform: scale(0.35) translateY(25px); filter: brightness(2.6) drop-shadow(0 0 20px #00d2ff); }
  65% { transform: scale(1.1) translateY(-6px); filter: brightness(1.4); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: brightness(1); }
}

/* Attacking & Blocking Markers */
.card.selected-attacker {
  border-color: #ff3366 !important;
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.9), 0 0 30px rgba(255, 102, 0, 0.7) !important;
  transform: translateY(-12px) scale(1.08) !important;
  animation: attackAuraPulse 0.9s infinite alternate ease-in-out !important;
  z-index: 30;
}

@keyframes attackAuraPulse {
  0% { box-shadow: 0 0 12px rgba(255, 51, 102, 0.8); }
  100% { box-shadow: 0 0 24px rgba(255, 51, 102, 1), 0 0 40px rgba(255, 102, 0, 0.8); }
}

.card.selected-blocker {
  border-color: #00d2ff !important;
  box-shadow: 0 0 18px rgba(0, 210, 255, 0.9), 0 0 32px rgba(59, 130, 246, 0.6) !important;
  transform: translateY(8px) scale(1.06);
}

.card.targetable-block {
  border-color: #00d2ff !important;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.8) !important;
  animation: blockTargetGlow 0.85s infinite alternate ease-in-out !important;
  cursor: crosshair !important;
}

@keyframes blockTargetGlow {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.05); filter: brightness(1.25) drop-shadow(0 0 12px #00d2ff); }
}

/* Floating Damage & Heal Numbers */
.floating-damage {
  position: absolute;
  font-family: var(--font-comic);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ff3366;
  text-shadow: 2px 2px 0 #000, 0 0 12px rgba(255, 51, 102, 0.8);
  pointer-events: none;
  animation: float-up 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 1000;
}

.floating-damage.heal {
  color: #2ecc71;
  text-shadow: 2px 2px 0 #000, 0 0 14px rgba(46, 204, 113, 0.9);
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(10px) scale(0.6); }
  25% { opacity: 1; transform: translateY(-12px) scale(1.3); }
  80% { opacity: 1; transform: translateY(-40px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.9); }
}

/* Game Over Modal */
.gameover-card {
  background: #171c2d;
  border: 3px solid var(--gold-primary);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 0 30px var(--gold-glow);
}

.trophy-bounce {
  font-size: 4rem;
  margin-bottom: 10px;
  animation: bounce 1s infinite alternate ease-in-out;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-15px); }
}

#gameover-title {
  font-family: var(--font-comic);
  font-size: 3rem;
  color: var(--gold-primary);
  text-shadow: 3px 3px 0 #000;
}

#gameover-subtitle {
  color: #a0aec0;
  margin: 10px 0 20px 0;
  font-size: 0.95rem;
}

.gameover-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Quaternary Menu Button (Dragon Green) */
.menu-btn.quaternary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ========================================================
   DRAGON BALL CHARACTER WIKI MODAL STYLING
   ======================================================== */
.wiki-card {
  background: #14192b;
  border: 2px solid #3d4a73;
  border-radius: 18px;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.9), 0 0 30px rgba(0, 210, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.wiki-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  border-bottom: 1px solid #28334e;
  padding-bottom: 10px;
}

.wiki-title-box h2 {
  font-family: var(--font-comic);
  color: var(--gold-primary);
  font-size: 1.8rem;
  letter-spacing: 1px;
}

.wiki-subtitle {
  font-size: 0.82rem;
  color: #a0aec0;
}

/* Filter & Search Bar */
.wiki-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.wiki-search-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

#wiki-search-input {
  flex: 1;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #3a476b;
  background: #0d111c;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.wiki-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #3a476b;
  background: #182035;
  color: #ffcc00;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.wiki-select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.wiki-selectors-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.wiki-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wiki-select-wrap label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8fa0c0;
  text-transform: uppercase;
}

.wiki-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.wiki-pill {
  background: #1e263d;
  border: 1px solid #374468;
  color: #cbd5e0;
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.wiki-pill.active {
  background: var(--orange-saiyan);
  border-color: var(--gold-primary);
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 102, 0, 0.5);
}

/* User Display Preferences Bar */
.wiki-view-toggles {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f1322;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #28334e;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.toggles-label {
  color: #8fa0c0;
  font-weight: 800;
  text-transform: uppercase;
}

.toggle-check {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e0;
  font-weight: 600;
  cursor: pointer;
}

.toggle-check input {
  accent-color: var(--orange-saiyan);
  cursor: pointer;
}

.badge-saga {
  background: #183b54;
  color: #00d2ff;
  border: 1px solid #236594;
}

/* Character Grid View */
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 6px 4px 14px 4px;
  max-height: 65vh;
}

.wiki-grid-item {
  background: #192035;
  border: 2px solid #2d3752;
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  animation: wikiItemPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes wikiItemPop {
  0% { opacity: 0; transform: translateY(14px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.wiki-grid-item:hover, .wiki-grid-item:focus {
  transform: translateY(-6px) scale(1.05);
  border-color: var(--gold-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 16px var(--gold-glow);
}

.wiki-thumb-wrap {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, #2a375e 0%, #0d1222 100%);
  border: 2px solid #3c4c78;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wiki-grid-item:hover .wiki-thumb-wrap {
  border-color: #ffcc00;
  box-shadow: 0 0 16px rgba(255, 204, 0, 0.9), 0 0 28px rgba(0, 210, 255, 0.6);
  transform: scale(1.08);
}

.wiki-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.25s ease;
}

.wiki-grid-item:hover .wiki-thumb-wrap img {
  transform: scale(1.06);
}

.wiki-item-name {
  font-weight: 800;
  font-size: 0.82rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.wiki-item-tag {
  font-size: 0.65rem;
  color: #00d2ff;
  font-weight: 700;
  margin-top: 2px;
}

/* Detail Dossier View */
.wiki-detail {
  overflow-y: auto;
  max-height: 70vh;
  padding-right: 6px;
  animation: wikiDetailFadeIn 0.3s ease-out;
}

@keyframes wikiDetailFadeIn {
  0% { opacity: 0; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

.wiki-back-btn {
  margin-bottom: 12px;
}

.wiki-detail-layout {
  display: flex;
  gap: 22px;
}

@media (max-width: 650px) {
  .wiki-detail-layout {
    flex-direction: column;
    align-items: center;
  }
}

.wiki-gallery-col {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wiki-hero-img-wrap {
  width: 230px;
  height: 250px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.8), 0 0 24px var(--gold-glow);
  position: relative;
  background: radial-gradient(circle, #253359 0%, #090e1a 100%);
}

.wiki-hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

/* Anime Power-Up Transformation Flash */
.transform-burst {
  animation: kiBurstEffect 0.5s ease-out !important;
}

@keyframes kiBurstEffect {
  0% { filter: brightness(3.5) contrast(1.4) drop-shadow(0 0 35px #ffcc00); transform: scale(0.95); }
  40% { filter: brightness(2) drop-shadow(0 0 45px #00d2ff); transform: scale(1.06); }
  100% { filter: brightness(1); transform: scale(1); }
}

.wiki-hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold-primary);
  text-align: center;
  padding: 4px;
}

.wiki-thumbs-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8fa0c0;
  margin: 10px 0 4px 0;
  text-transform: uppercase;
}

.wiki-thumbs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  max-width: 240px;
}

.wiki-thumb-btn {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  border: 2px solid #3c4c78;
  overflow: hidden;
  background: #0d1222;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  padding: 0;
}

.wiki-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wiki-thumb-btn.active {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
  transform: scale(1.1);
}

.wiki-info-col {
  flex: 1;
  text-align: left;
}

#wiki-char-name {
  font-family: var(--font-comic);
  font-size: 2rem;
  color: var(--gold-primary);
  line-height: 1.1;
}

.wiki-char-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #00d2ff;
  margin-bottom: 8px;
}

.wiki-tags-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.wiki-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-race {
  background: #2a375e;
  color: #ffcc00;
  border: 1px solid #4a5c91;
}

.badge-faction {
  background: #4a2561;
  color: #d896ff;
  border: 1px solid #733c94;
}

.wiki-section {
  margin-bottom: 12px;
}

.wiki-section h4 {
  font-size: 0.85rem;
  color: #8fa0c0;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wiki-section p {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.wiki-pill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wiki-tag-pill {
  background: #172138;
  border: 1px solid #2e3d63;
  color: #cbd5e0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.wiki-funfact-box {
  background: rgba(255, 204, 0, 0.1);
  border-left: 4px solid var(--gold-primary);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin-top: 14px;
}

.wiki-funfact-box h4 {
  color: var(--gold-primary);
  margin-bottom: 3px;
}

.wiki-funfact-box p {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

/* ========================================================
   MAJOR EXPANSION FEATURES STYLING
   ======================================================== */

/* Menu Buttons */
.menu-btn.pack-btn {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.menu-btn.builder-btn {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.menu-btn.pass-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

#btn-bgm {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid #8b5cf6;
  color: #c084fc;
}

/* ========================================================
   🐉 DRAGON RADAR & DRAGON BALLS
   ======================================================== */
.dragon-radar-meter {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 15, 29, 0.9);
  border: 1px solid #2e3d63;
  padding: 2px 8px;
  border-radius: 14px;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.dragon-radar-meter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.25), transparent);
  transform: translateX(-100%);
  animation: radarScanSweep 3.2s infinite linear;
  pointer-events: none;
}

@keyframes radarScanSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.radar-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #ff9900;
  letter-spacing: 0.5px;
}

.radar-balls-row {
  display: flex;
  gap: 3px;
  position: relative;
  z-index: 2;
}

.radar-ball {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #252e42;
  border: 1px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #64748b;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.radar-ball.collected {
  background: radial-gradient(circle, #ffe600 0%, #ff5500 100%);
  border-color: #ffcc00;
  color: #b91c1c;
  box-shadow: 0 0 8px rgba(255, 153, 0, 0.9), 0 0 16px rgba(255, 68, 0, 0.7);
  transform: scale(1.18);
  animation: starBallPulse 1.8s infinite alternate ease-in-out;
}

@keyframes starBallPulse {
  0% { transform: scale(1.12); filter: brightness(1); }
  100% { transform: scale(1.24); filter: brightness(1.3) drop-shadow(0 0 5px #ffcc00); }
}

.btn-shenron {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 1px solid #34d399;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  margin-left: 6px;
  position: relative;
  z-index: 2;
}

.pulse-gold {
  animation: pulseGoldGlow 1.1s infinite alternate ease-in-out;
}

@keyframes pulseGoldGlow {
  0% { transform: scale(1); box-shadow: 0 0 6px #ffcc00; }
  100% { transform: scale(1.1); box-shadow: 0 0 20px #ff9900, 0 0 35px #ff3300; }
}

/* ==========================================
   🌪️ MID-BATTLE FUSION BUTTON
   ========================================== */
.fusion-btn {
  background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
  color: #fff !important;
  border: 2px solid #f472b6 !important;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.7) !important;
}

/* ==========================================
   🐉 SHENRON WISH MODAL
   ========================================== */
.shenron-card {
  background: radial-gradient(circle, #091a1a 0%, #03080e 100%);
  border: 2px solid #10b981;
  border-radius: 20px;
  max-width: 680px;
  width: 95%;
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.6), 0 0 80px rgba(5, 150, 105, 0.3);
  position: relative;
  overflow: hidden;
}

.shenron-dragon-graphic {
  font-size: 4rem;
  animation: float-shenron 3s infinite ease-in-out;
}

@keyframes float-shenron {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.shenron-title {
  font-family: var(--font-comic);
  font-size: 2.5rem;
  color: #34d399;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.8), 2px 2px 0 #000;
  margin: 6px 0;
}

.shenron-subtitle {
  color: #a7f3d0;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.wish-options-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.wish-card {
  background: #0d2222;
  border: 2px solid #059669;
  border-radius: 14px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.wish-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: #34d399;
  box-shadow: 0 0 25px rgba(52, 211, 153, 0.6);
  background: #133333;
}

.wish-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.wish-card h3 {
  font-size: 1rem;
  color: #fff;
  font-weight: 800;
  margin-bottom: 6px;
}

.wish-card p {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* ==========================================
   ⚡ ANIME AURA CUT-IN BANNER
   ========================================== */
.cutin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}

.cutin-banner {
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, #1e1b4b 20%, #4338ca 50%, #1e1b4b 80%, transparent 100%);
  border-top: 3px solid #ffcc00;
  border-bottom: 3px solid #ffcc00;
  box-shadow: 0 0 40px rgba(255, 204, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 40px;
  animation: cutInSlide 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cutInSlide {
  0% { transform: scaleX(0); opacity: 0; }
  20% { transform: scaleX(1); opacity: 1; }
  85% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0); opacity: 0; }
}

.cutin-banner img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffcc00;
  box-shadow: 0 0 20px #ff9900;
}

.cutin-text-box h2 {
  font-family: var(--font-comic);
  font-size: 2.8rem;
  color: #ffcc00;
  text-shadow: 3px 3px 0 #000, 0 0 20px rgba(255, 204, 0, 0.9);
  letter-spacing: 2px;
}

.cutin-text-box p {
  font-weight: 800;
  font-size: 1rem;
  color: #e0e7ff;
  letter-spacing: 3px;
}

/* ==========================================
   📦 BOOSTER PACKS STYLING
   ========================================== */
.packs-card {
  max-width: 650px;
  width: 95%;
  text-align: center;
}

.packs-subtitle {
  color: #cbd5e0;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.sealed-pack-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.booster-foil {
  width: 200px;
  height: 290px;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 35%, #ec4899 70%, #f59e0b 100%);
  border: 3px solid #facc15;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 25px rgba(250, 204, 21, 0.5);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 12px;
  transition: all 0.3s;
  transform: rotate(-3deg);
}

.booster-foil:hover {
  transform: rotate(0deg) scale(1.06);
  box-shadow: 0 15px 40px rgba(0,0,0,0.9), 0 0 35px rgba(250, 204, 21, 0.8);
}

.foil-glimmer {
  position: absolute;
  inset: -60%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.5) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: foilSheenMove 3.5s infinite ease-in-out;
  pointer-events: none;
}

@keyframes foilSheenMove {
  0% { transform: translateY(-120%) rotate(25deg); }
  25%, 100% { transform: translateY(160%) rotate(25deg); }
}

.foil-logo {
  font-family: var(--font-comic);
  font-size: 1rem;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

.foil-art {
  font-size: 4rem;
}

.foil-rip-hint {
  font-weight: 800;
  font-size: 0.72rem;
  color: #facc15;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 8px;
}

.revealed-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 10px 0;
}

.revealed-card {
  width: 105px;
  background: #14192b;
  border: 2px solid #334155;
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  animation: cardFlipIn 0.5s ease-out forwards;
}

@keyframes cardFlipIn {
  0% { transform: scale(0.2) rotateY(180deg); opacity: 0; }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.revealed-card img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 4px;
}

.revealed-name {
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.revealed-rarity {
  font-size: 0.62rem;
  font-weight: 700;
  color: #facc15;
}

.revealed-card.foil-ultra {
  border-color: #ff00ff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.8), 0 0 25px rgba(0, 210, 255, 0.6);
  background: linear-gradient(135deg, #1e1b4b, #2e1065);
}

/* ==========================================
   🎴 CUSTOM DECK BUILDER
   ========================================== */
.deckbuilder-card {
  max-width: 880px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.deckbuilder-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

.mana-curve-hud {
  background: #0f1523;
  border: 1px solid #23304d;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deck-counts-box {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: #cbd5e0;
}

.deck-counts-box strong {
  color: #ffcc00;
}

.mana-curve-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 48px;
}

.curve-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 28px;
}

.curve-bar {
  width: 16px;
  background: #3b82f6;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s;
}

.curve-label {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 700;
}

.deckbuilder-split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  overflow: hidden;
  flex: 1;
}

@media (max-width: 650px) {
  .deckbuilder-split {
    grid-template-columns: 1fr;
  }
}

.db-section {
  background: #111728;
  border: 1px solid #28334e;
  border-radius: 12px;
  padding: 10px;
  overflow-y: auto;
  max-height: 48vh;
}

.db-section h3 {
  font-size: 0.8rem;
  color: #cbd5e0;
  margin-bottom: 8px;
}

.db-binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 8px;
}

.db-binder-item {
  background: #192238;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.db-binder-item:hover {
  transform: translateY(-3px);
  border-color: #ffcc00;
}

.db-binder-item img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.db-item-name {
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-item-cost {
  font-size: 0.62rem;
  color: #ffcc00;
  font-weight: 700;
}

.db-deck-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.db-deck-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #172138;
  border: 1px solid #2e3d63;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.2s;
}

.db-deck-row:hover {
  background: #253359;
  border-color: #ef4444;
}

/* ==========================================
   🥋 MASTER ROSHI'S DOJO
   ========================================== */
.dojo-card {
  max-width: 680px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.dojo-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.dojo-puzzles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 48vh;
  margin-bottom: 14px;
  padding-right: 4px;
}

.dojo-puzzle-item {
  background: #161e33;
  border: 1px solid #28375c;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.dojo-puzzle-item:hover {
  border-color: #f59e0b;
  transform: translateX(4px);
  background: #1d2742;
}

.puzzle-info h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 3px;
}

.puzzle-info p {
  font-size: 0.75rem;
  color: #94a3b8;
}

.puzzle-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #f59e0b;
}

.roshi-dialogue-box {
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.roshi-avatar {
  font-size: 2.5rem;
}

.roshi-speech strong {
  color: #f59e0b;
  font-size: 0.85rem;
}

.roshi-speech p {
  font-size: 0.8rem;
  color: #fff;
  margin-top: 2px;
  font-style: italic;
}

