@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0a0a;
  color: #00ff41;
  font-family: 'VT323', monospace;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* === EFFET CRT === */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
  z-index: 1000;
}

body::after {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 70%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
  z-index: 999;
}

/* === ANIMATIONS GLOBALES === */
@keyframes flicker {
  0%, 100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: 0.8; } 94% { opacity: 1; } 96% { opacity: 0.9; } 97% { opacity: 1; }
}

@keyframes textShadowGlow {
  0%, 100% { text-shadow: 0 0 5px #00ff41, 0 0 10px #00ff41, 0 0 20px #00ff41; }
  50% { text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41, 0 0 40px #00ff41, 0 0 60px #00ff41; }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes turnOn {
  0% { transform: scale(1, 0.01); filter: brightness(10); opacity: 0; }
  40% { transform: scale(1, 0.01); filter: brightness(10); opacity: 1; }
  60% { transform: scale(1, 1); filter: brightness(5); }
  100% { transform: scale(1, 1); filter: brightness(1); }
}

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

.crt-screen {
  animation: flicker 5s infinite, turnOn 1s ease-out;
  position: relative;
  z-index: 1;
}

.crt-screen::before {
  content: '';
  position: fixed;
  width: 100%; height: 8px;
  background: rgba(0, 255, 65, 0.05);
  z-index: 1001;
  animation: scanline 8s linear infinite;
  pointer-events: none;
}

.cursor-blink { animation: blink 1s step-end infinite; }
.hidden { display: none !important; }

.version-tag {
  position: fixed;
  bottom: 10px; right: 14px;
  font-size: 14px; color: #00ff41; z-index: 10;
  font-family: 'VT323', monospace;
  transition: color 0.2s, text-shadow 0.2s;
}
.version-tag:hover {
  color: #ffcc00;
  text-shadow: 0 0 8px #ffcc00;
}

/* === PATCH NOTES MODAL === */
.patchnotes-overlay {
  display: none;
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center; align-items: center;
}
.patchnotes-overlay.active { display: flex; }

.patchnotes-modal {
  background: #0a0a0a;
  border: 2px solid #00ff41;
  border-radius: 8px;
  width: 90%; max-width: 600px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  font-family: 'VT323', monospace;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
  position: relative;
}
.patchnotes-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none;
  color: #ff4444; font-size: 28px;
  cursor: pointer; z-index: 1;
  font-family: 'VT323', monospace;
}
.patchnotes-close:hover { color: #ff6666; text-shadow: 0 0 8px #ff4444; }

.patchnotes-title {
  text-align: center;
  color: #00ff41; font-size: 24px;
  padding: 16px;
  border-bottom: 1px solid #003300;
  font-family: 'Press Start 2P', cursive;
  text-shadow: 0 0 10px #00ff41;
}
.patchnotes-content {
  overflow-y: auto; padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: #00ff41 #0a0a0a;
}
.patchnotes-content::-webkit-scrollbar { width: 6px; }
.patchnotes-content::-webkit-scrollbar-track { background: #0a0a0a; }
.patchnotes-content::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 3px; }

.patch-version {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0 4px;
  border-bottom: 1px dashed #003300;
  margin-top: 12px;
}
.patch-version:first-child { margin-top: 0; }
.patch-version h3 {
  color: #ffcc00; font-size: 16px;
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
}
.patch-date { color: #666; font-size: 16px; }

.patch-section { padding: 8px 0; }
.patch-section h4 {
  color: #00ff41; font-size: 16px;
  margin-bottom: 6px; letter-spacing: 2px;
}
.patch-section ul { list-style: none; padding: 0; }
.patch-section li {
  color: #aaa; font-size: 17px;
  padding: 3px 0 3px 8px;
  border-left: 2px solid transparent;
  transition: border-color 0.2s;
}
.patch-section li:hover { border-left-color: #00ff41; color: #ddd; }

.patch-new {
  display: inline-block; padding: 1px 6px;
  background: #00aa44; color: #000;
  font-size: 12px; font-weight: bold;
  border-radius: 3px; margin-right: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px; vertical-align: middle;
}
.patch-buff {
  display: inline-block; padding: 1px 6px;
  background: #2299ff; color: #000;
  font-size: 12px; font-weight: bold;
  border-radius: 3px; margin-right: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px; vertical-align: middle;
}
.patch-fix {
  display: inline-block; padding: 1px 6px;
  background: #ff6600; color: #000;
  font-size: 12px; font-weight: bold;
  border-radius: 3px; margin-right: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px; vertical-align: middle;
}
.patch-change {
  display: inline-block; padding: 1px 6px;
  background: #ffcc00; color: #000;
  font-size: 12px; font-weight: bold;
  border-radius: 3px; margin-right: 6px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px; vertical-align: middle;
}

/* ==============================
   PAGE AUTH
   ============================== */

.auth-container {
  width: 420px;
  padding: 40px;
  border: 2px solid #00ff41;
  border-radius: 4px;
  background: rgba(0, 20, 0, 0.8);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2), inset 0 0 20px rgba(0, 255, 65, 0.05);
}

.auth-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 20px; text-align: center; margin-bottom: 8px;
  animation: textShadowGlow 3s ease-in-out infinite; color: #00ff41;
}

.auth-subtitle { text-align: center; font-size: 18px; color: #00cc33; margin-bottom: 30px; }

.tab-container { display: flex; margin-bottom: 24px; border-bottom: 1px solid #00ff41; }

.tab-btn {
  flex: 1; background: none; border: none; color: #006b1f;
  font-family: 'VT323', monospace; font-size: 22px; padding: 10px;
  cursor: pointer; transition: all 0.2s; border-bottom: 2px solid transparent;
}
.tab-btn:hover { color: #00cc33; }
.tab-btn.active { color: #00ff41; border-bottom-color: #00ff41; text-shadow: 0 0 10px #00ff41; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 18px; margin-bottom: 6px; color: #00cc33; }
.form-group input {
  width: 100%; padding: 10px 14px;
  background: rgba(0, 40, 0, 0.6); border: 1px solid #00ff41; border-radius: 2px;
  color: #00ff41; font-family: 'VT323', monospace; font-size: 20px; outline: none; transition: all 0.2s;
}
.form-group input:focus { box-shadow: 0 0 10px rgba(0, 255, 65, 0.3); border-color: #66ff88; }
.form-group input::placeholder { color: #005520; }

.submit-btn {
  width: 100%; padding: 12px;
  background: rgba(0, 255, 65, 0.1); border: 2px solid #00ff41; color: #00ff41;
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  cursor: pointer; transition: all 0.2s; margin-top: 10px;
}
.submit-btn:hover { background: rgba(0, 255, 65, 0.25); box-shadow: 0 0 20px rgba(0, 255, 65, 0.3); text-shadow: 0 0 10px #00ff41; }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.message { text-align: center; font-size: 18px; margin-top: 14px; min-height: 22px; }
.message.error { color: #ff4444; text-shadow: 0 0 10px rgba(255, 68, 68, 0.4); }
.message.success { color: #00ff41; text-shadow: 0 0 10px rgba(0, 255, 65, 0.4); }

.form-panel { display: none; }
.form-panel.active { display: block; }

/* ==============================
   PAGE MENU
   ============================== */

/* Fond grille */
.bg-grid {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(0,255,65,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,65,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0; pointer-events: none;
  animation: gridPulse 6s ease-in-out infinite;
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Scanline animee */
.scanline-bar {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,255,65,0.12) 20%, rgba(0,255,65,0.2) 50%, rgba(0,255,65,0.12) 80%, transparent 100%);
  z-index: 1002; animation: scanlineMove 4s linear infinite;
  pointer-events: none;
  box-shadow: 0 0 15px rgba(0,255,65,0.08), 0 2px 8px rgba(0,255,65,0.08);
}
@keyframes scanlineMove { 0% { top: -3px; } 100% { top: 100vh; } }

/* === MENU WRAPPER === */
.menu-wrapper {
  width: 650px; max-width: 95vw;
  background: rgba(0, 8, 0, 0.85);
  border: 1px solid #003300;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0,255,65,0.05);
  overflow: hidden;
}

/* === HEADER BARRE === */
.menu-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  background: rgba(0, 15, 0, 0.6);
  border-bottom: 1px solid #003300;
}
.header-rank {
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  color: #ffaa00; letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255,170,0,0.4);
}
.header-user {
  font-family: 'VT323', monospace; font-size: 20px;
  color: #00ff41; text-shadow: 0 0 10px rgba(0,255,65,0.5);
}
.cursor-blink { animation: cursorBlink 1s step-end infinite; }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.header-stats {
  display: flex; gap: 16px;
}
.header-stat {
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  color: #00cc33; text-shadow: 0 0 6px rgba(0,204,51,0.3);
}

/* === TITRE GLITCH === */
.menu-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 32px;
  animation: textShadowGlow 3s ease-in-out infinite;
  margin: 30px 0 20px;
  position: relative;
  display: inline-block;
  letter-spacing: 4px;
}
.menu-title::before,
.menu-title::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; overflow: hidden;
}
.menu-title::before {
  color: #00ff41;
  animation: glitchTop 3s infinite linear alternate-reverse;
  clip-path: inset(0 0 60% 0);
  text-shadow: -2px 0 #ff0000;
}
.menu-title::after {
  color: #00ff41;
  animation: glitchBottom 2.5s infinite linear alternate-reverse;
  clip-path: inset(60% 0 0 0);
  text-shadow: 2px 0 #0000ff;
}
@keyframes glitchTop {
  0%, 94% { transform: translate(0); }
  95% { transform: translate(-3px, -1px); }
  96% { transform: translate(2px, 1px); }
  97% { transform: translate(-1px, 0); }
  100% { transform: translate(0); }
}
@keyframes glitchBottom {
  0%, 92% { transform: translate(0); }
  93% { transform: translate(3px, 1px); }
  95% { transform: translate(-2px, -1px); }
  97% { transform: translate(1px, 0); }
  100% { transform: translate(0); }
}

/* === NAVIGATION BOUTONS RONDS === */
.menu-nav {
  display: flex; justify-content: center; gap: 40px;
  padding: 20px 0 30px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: 0.3s;
}
.nav-item:hover { transform: translateY(-4px); }
.nav-item:active { transform: translateY(0) scale(0.96); }

.nav-btn {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid #00ff41;
  background: rgba(0, 30, 0, 0.8);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  transition: all 0.3s;
  box-shadow: 0 0 15px rgba(0,255,65,0.1), inset 0 0 15px rgba(0,255,65,0.05);
  position: relative; overflow: hidden;
}
.nav-btn::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.08), transparent);
  transition: left 0.5s;
}
.nav-item:hover .nav-btn::before { left: 150%; }
.nav-btn:hover, .nav-item:hover .nav-btn {
  transform: scale(1.12);
  box-shadow: 0 0 30px rgba(0,255,65,0.3), inset 0 0 20px rgba(0,255,65,0.08);
  border-color: #44ff88;
  background: rgba(0, 50, 0, 0.8);
}
.nav-btn:active { transform: scale(0.95); }

/* Bouton COMBAT special rouge */
.nav-combat {
  border-color: #ff4444;
  box-shadow: 0 0 15px rgba(255,68,68,0.15), inset 0 0 15px rgba(255,68,68,0.05);
  animation: combatPulse 2s ease-in-out infinite;
}
.nav-combat:hover, .nav-item:hover .nav-combat {
  box-shadow: 0 0 30px rgba(255,68,68,0.4), inset 0 0 20px rgba(255,68,68,0.1);
  border-color: #ff6666;
  background: rgba(50, 0, 0, 0.8);
}
@keyframes combatPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 68, 68, 0.15); }
  50% { box-shadow: 0 0 25px rgba(255, 68, 68, 0.35); }
}

/* Bouton DAILY special orange */
.nav-daily {
  border-color: #ffaa00;
  box-shadow: 0 0 15px rgba(255,170,0,0.15), inset 0 0 15px rgba(255,170,0,0.05);
  animation: dailyPulse 2s ease-in-out infinite;
}
.nav-daily:hover, .nav-item:hover .nav-daily {
  box-shadow: 0 0 30px rgba(255,170,0,0.4), inset 0 0 20px rgba(255,170,0,0.1);
  border-color: #ffcc44;
  background: rgba(50, 30, 0, 0.8);
}
.nav-daily.daily-claimed {
  border-color: #333; opacity: 0.5;
  animation: none; cursor: default;
  box-shadow: none;
}
#daily-item.daily-claimed { cursor: default; pointer-events: none; }
#daily-item.daily-claimed .nav-label { color: #555; }
.daily-flash { animation: dailyCollect 0.6s ease-out !important; }

.nav-label {
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  color: #00ff41; letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(0,255,65,0.3);
}
.nav-sub {
  font-family: 'VT323', monospace; font-size: 16px;
  color: #ffaa00; text-shadow: 0 0 6px rgba(255,170,0,0.3);
}

@keyframes dailyPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 170, 0, 0.15); }
  50% { box-shadow: 0 0 25px rgba(255, 170, 0, 0.4); }
}
@keyframes dailyCollect {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); filter: brightness(2); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* === ADMIN BUTTON === */
.menu-admin {
  margin: 0 20px 16px; padding: 10px;
  border: 1px solid #ff4444; color: #ff4444;
  border-radius: 6px; text-align: center; cursor: pointer;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  background: rgba(255, 68, 68, 0.05);
  transition: all 0.3s;
}
.menu-admin:hover {
  background: rgba(255, 68, 68, 0.15);
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

/* === FOOTER === */
.menu-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  border-top: 1px solid #003300;
  font-family: 'VT323', monospace; font-size: 16px;
  color: #006b1f;
}
.footer-version {
  cursor: pointer; transition: color 0.2s;
}
.footer-version:hover { color: #00ff41; text-shadow: 0 0 6px rgba(0,255,65,0.4); }
.footer-status {
  font-size: 14px;
}
.status-online {
  color: #44ff66;
  animation: onlinePulse 2s ease-in-out infinite;
}
@keyframes onlinePulse {
  0%, 100% { text-shadow: 0 0 5px rgba(68,255,102,0.4); }
  50% { text-shadow: 0 0 15px rgba(68,255,102,0.8); }
}
.footer-logout {
  cursor: pointer; color: #660000; transition: all 0.2s;
}
.footer-logout:hover { color: #ff4444; text-shadow: 0 0 8px rgba(255,68,68,0.4); }

/* === RESPONSIVE MENU === */
@media (max-width: 600px) {
  .menu-header { flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px 14px; }
  .menu-title { font-size: 22px; margin: 20px 0 14px; letter-spacing: 2px; }
  .menu-nav { gap: 24px; padding: 16px 0 24px; }
  .nav-btn { width: 64px; height: 64px; font-size: 26px; }
  .nav-label { font-size: 7px; }
  .nav-sub { font-size: 14px; }
  .menu-footer { flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 14px; padding: 10px 14px; }
  .header-stat { font-size: 7px; }
}

/* ==============================
   DASHBOARD PAGE — REFONTE MENU
   ============================== */

/* Body override for dashboard only */
body.dashboard-page {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 100vh;
  animation: flicker 5s infinite;
}

/* === NAVBAR === */
.dash-navbar {
  position: sticky;
  top: 0;
  z-index: 1003;
  background: rgba(5, 5, 5, 0.96);
  border-bottom: 1px solid #003300;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0, 255, 65, 0.06);
  flex-shrink: 0;
}

.dash-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
}

.dash-nav-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: #00ff41;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.5), 0 0 30px rgba(0, 255, 65, 0.15);
  letter-spacing: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
  position: relative;
}

.dash-nav-links {
  display: flex;
  gap: 4px;
}

.dash-nav-link {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #335533;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.25s;
  letter-spacing: 1px;
  position: relative;
}

.dash-nav-link:hover {
  color: #00ff41;
  background: rgba(0, 255, 65, 0.06);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.dash-nav-link--active {
  color: #00ff41;
  background: rgba(0, 255, 65, 0.08);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

.dash-nav-link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #00ff41;
  box-shadow: 0 0 8px #00ff41;
  border-radius: 1px;
}

.dash-nav-link--combat {
  color: #663333;
}
.dash-nav-link--combat:hover {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.06);
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

.dash-nav-link--bonus {
  color: #665533;
}
.dash-nav-link--bonus:hover {
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.06);
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}

.dash-nav-link--shop {
  color: #225566;
}
.dash-nav-link--shop:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.06);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.dash-nav-user {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.dash-nav-stat {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #00cc33;
  text-shadow: 0 0 6px rgba(0, 204, 51, 0.25);
}

.dash-nav-username {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: #00ff41;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
  padding-left: 16px;
  border-left: 1px solid #1a3a1a;
}

/* === DASHBOARD LAYOUT === */
.dash-content {
  display: flex;
  gap: 24px;
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 24px;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

/* === PLAYER PROFILE SIDEBAR === */
.dash-profile {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-profile-card {
  background: rgba(0, 8, 0, 0.85);
  border: 1px solid #1a3a1a;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 0 24px rgba(0, 255, 65, 0.04);
  position: relative;
  overflow: hidden;
}

.dash-profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00ff41, transparent);
  opacity: 0.4;
}

.dash-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid #00ff41;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: radial-gradient(circle, rgba(0, 50, 0, 0.6), rgba(0, 15, 0, 0.8));
  box-shadow: 0 0 24px rgba(0, 255, 65, 0.12), inset 0 0 20px rgba(0, 255, 65, 0.05);
}

.dash-profile-name {
  font-family: 'VT323', monospace;
  font-size: 24px;
  color: #00ff41;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
  margin-bottom: 8px;
}

.dash-profile-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.dash-rank-badge {
  color: #ffaa00;
  font-size: 16px;
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}

.dash-rank-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #ffaa00;
  text-shadow: 0 0 6px rgba(255, 170, 0, 0.3);
  letter-spacing: 2px;
}

.dash-profile-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #1a3a1a, transparent);
  margin: 18px 0;
}

.dash-profile-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-pstat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.dash-pstat-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #335533;
  letter-spacing: 1px;
}

.dash-pstat-value {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.dash-pstat-rank {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #ffaa00;
  text-shadow: 0 0 6px rgba(255, 170, 0, 0.3);
}

/* Admin button */
.dash-admin-btn {
  padding: 12px;
  border: 1px solid rgba(255, 68, 68, 0.4);
  color: #ff4444;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  background: rgba(255, 68, 68, 0.04);
  transition: all 0.3s;
  letter-spacing: 1px;
}

.dash-admin-btn:hover {
  background: rgba(255, 68, 68, 0.12);
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.2);
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
  border-color: #ff4444;
}

/* === MAIN CONTENT AREA === */
.dash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === HERO CTA === */
.dash-hero {
  position: relative;
  background: rgba(0, 8, 0, 0.85);
  border: 1px solid rgba(255, 68, 68, 0.2);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  overflow: hidden;
}

.dash-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff4444, transparent);
  opacity: 0.5;
}

.dash-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, rgba(255, 68, 68, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.dash-hero-content {
  position: relative;
  z-index: 1;
}

.dash-hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 20px;
  color: #ff4444;
  text-shadow: 0 0 24px rgba(255, 68, 68, 0.4), 0 0 60px rgba(255, 68, 68, 0.1);
  margin: 0 0 12px;
  letter-spacing: 3px;
}

.dash-hero-sub {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: #666;
  margin: 0 0 28px;
}

.dash-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 68, 68, 0.1);
  border: 2px solid #ff4444;
  color: #ff4444;
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  padding: 18px 48px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  animation: heroBtnPulse 2.5s ease-in-out infinite;
  letter-spacing: 3px;
  position: relative;
  overflow: hidden;
}

.dash-hero-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.08), transparent);
  transition: left 0.6s;
}

.dash-hero-btn:hover::before {
  left: 150%;
}

.dash-hero-btn:hover {
  background: rgba(255, 68, 68, 0.2);
  box-shadow: 0 0 50px rgba(255, 68, 68, 0.3), inset 0 0 30px rgba(255, 68, 68, 0.05);
  text-shadow: 0 0 12px rgba(255, 68, 68, 0.6);
  transform: scale(1.04);
}

.dash-hero-btn:active {
  transform: scale(0.97);
}

.dash-hero-btn-icon {
  font-size: 26px;
}

@keyframes heroBtnPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 68, 68, 0.15); }
  50% { box-shadow: 0 0 35px rgba(255, 68, 68, 0.35), 0 0 80px rgba(255, 68, 68, 0.1); }
}

/* === DASHBOARD CARDS GRID === */
.dash-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dash-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 8, 0, 0.85);
  border: 1px solid #1a3a1a;
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.dash-card:hover::before {
  opacity: 0.5;
}

.dash-card:hover {
  transform: translateY(-2px);
}

.dash-card-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 30, 0, 0.5);
  border: 1px solid #1a3a1a;
}

.dash-card-info {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.dash-card-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  margin: 0 0 6px;
  letter-spacing: 1px;
}

.dash-card-desc {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #556655;
  margin: 0;
}

.dash-card-arrow {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #1a3a1a;
  transition: all 0.3s;
  flex-shrink: 0;
}

.dash-card:hover .dash-card-arrow {
  color: #00ff41;
  transform: translateX(3px);
}

/* --- Bonus card (orange) --- */
.dash-card--bonus {
  border-color: rgba(255, 170, 0, 0.2);
}
.dash-card--bonus::before {
  background: linear-gradient(90deg, transparent, #ffaa00, transparent);
}
.dash-card--bonus:hover {
  border-color: rgba(255, 170, 0, 0.5);
  box-shadow: 0 0 24px rgba(255, 170, 0, 0.08);
}
.dash-card--bonus .dash-card-title {
  color: #ffaa00;
}
.dash-card--bonus .dash-card-icon {
  border-color: rgba(255, 170, 0, 0.2);
  background: rgba(50, 30, 0, 0.4);
}
.dash-card--bonus.daily-claimed {
  opacity: 0.5;
  cursor: default;
}
.dash-card--bonus.daily-claimed:hover {
  transform: none;
  box-shadow: none;
}

.dash-card-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.4);
  background: rgba(255, 170, 0, 0.08);
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.dash-card-btn:hover {
  background: rgba(255, 170, 0, 0.2);
  box-shadow: 0 0 16px rgba(255, 170, 0, 0.2);
  text-shadow: 0 0 6px rgba(255, 170, 0, 0.4);
  border-color: #ffaa00;
}

.dash-card-btn.daily-claimed {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* --- Boutique card (cyan) --- */
.dash-card--shop {
  border-color: rgba(0, 229, 255, 0.15);
}
.dash-card--shop::before {
  background: linear-gradient(90deg, transparent, #00e5ff, transparent);
}
.dash-card--shop:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.08);
}
.dash-card--shop .dash-card-title {
  color: #00e5ff;
}
.dash-card--shop .dash-card-icon {
  border-color: rgba(0, 229, 255, 0.15);
  background: rgba(0, 20, 30, 0.4);
}
.dash-card--shop:hover .dash-card-arrow {
  color: #00e5ff;
}

/* --- Collection card (green) --- */
.dash-card--collection {
  border-color: rgba(0, 255, 65, 0.15);
}
.dash-card--collection::before {
  background: linear-gradient(90deg, transparent, #00ff41, transparent);
}
.dash-card--collection:hover {
  border-color: rgba(0, 255, 65, 0.4);
  box-shadow: 0 0 24px rgba(0, 255, 65, 0.08);
}
.dash-card--collection .dash-card-title {
  color: #00ff41;
}
.dash-card--collection .dash-card-icon {
  border-color: rgba(0, 255, 65, 0.15);
  background: rgba(0, 20, 0, 0.4);
}

/* --- Patch Notes card (gray/neutral) --- */
.dash-card--patch {
  border-color: rgba(120, 120, 120, 0.15);
}
.dash-card--patch::before {
  background: linear-gradient(90deg, transparent, #888, transparent);
}
.dash-card--patch:hover {
  border-color: rgba(120, 120, 120, 0.4);
  box-shadow: 0 0 24px rgba(120, 120, 120, 0.06);
}
.dash-card--patch .dash-card-title {
  color: #888;
}
.dash-card--patch .dash-card-icon {
  border-color: rgba(120, 120, 120, 0.15);
  background: rgba(20, 20, 20, 0.4);
}
.dash-card--patch:hover .dash-card-arrow {
  color: #aaa;
}

/* === DASHBOARD FOOTER === */
.dash-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid #1a2a1a;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #335533;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.dash-footer-version {
  cursor: default;
  letter-spacing: 1px;
}

.dash-footer-logout {
  cursor: pointer;
  color: #553333;
  transition: all 0.25s;
  letter-spacing: 1px;
}

.dash-footer-logout:hover {
  color: #ff4444;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

/* === DASHBOARD RESPONSIVE === */
@media (max-width: 1100px) {
  .dash-nav-links {
    gap: 2px;
  }
  .dash-nav-link {
    padding: 8px 10px;
    font-size: 7px;
  }
}

@media (max-width: 900px) {
  .dash-content {
    flex-direction: column;
  }
  .dash-profile {
    width: 100%;
  }
  .dash-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    padding: 20px;
  }
  .dash-avatar {
    margin: 0;
    width: 64px;
    height: 64px;
    font-size: 28px;
    flex-shrink: 0;
  }
  .dash-profile-divider {
    display: none;
  }
  .dash-profile-stats {
    flex-direction: row;
    gap: 20px;
  }
  .dash-cards-grid {
    grid-template-columns: 1fr;
  }
  .dash-nav-links {
    display: none;
  }
  .dash-navbar-inner {
    height: 48px;
  }
  .dash-hero {
    padding: 32px 20px;
  }
  .dash-hero-title {
    font-size: 14px;
  }
  .dash-hero-btn {
    font-size: 14px;
    padding: 14px 32px;
  }
}

/* ==============================
   COLLECTION DASHBOARD — REFONTE
   ============================== */

/* Body override for collection page */
body.collection-page {
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  height: 100vh;
}

/* === LAYOUT === */
.coll-layout {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 56px);
  width: 100%;
  position: relative;
}

/* === SIDEBAR === */
.coll-sidebar {
  width: 250px;
  min-width: 250px;
  background: rgba(0, 8, 0, 0.95);
  border-right: 1px solid #1a3a1a;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.coll-sidebar::-webkit-scrollbar { width: 4px; }
.coll-sidebar::-webkit-scrollbar-track { background: transparent; }
.coll-sidebar::-webkit-scrollbar-thumb { background: #004d15; border-radius: 2px; }

.coll-sidebar-section {
  padding: 16px;
  border-bottom: 1px solid #1a3a1a;
}

.coll-sidebar-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #006b1f;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Sidebar nav items */
.coll-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coll-nav-item {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: #00cc33;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.coll-nav-item:hover {
  background: rgba(0, 255, 65, 0.05);
  color: #00ff41;
}

.coll-nav-item--active {
  border-left-color: #00ff41;
  color: #00ff41;
  background: rgba(0, 255, 65, 0.08);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

/* Sidebar stats */
.coll-progress {
  margin-bottom: 14px;
}

.coll-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #00cc33;
  margin-bottom: 6px;
}

.coll-progress-bar {
  height: 6px;
  background: #0a1a0a;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #1a3a1a;
}

.coll-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff41, #00cc33);
  border-radius: 3px;
  transition: width 0.6s ease;
  width: 0%;
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
}

.coll-stat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coll-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'VT323', monospace;
  font-size: 16px;
}

.coll-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.coll-stat-label {
  color: #669966;
  flex: 1;
}

.coll-stat-value {
  color: #00ff41;
  font-weight: bold;
  min-width: 24px;
  text-align: right;
}

/* Sidebar filter buttons */
.coll-sidebar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coll-filter-btn {
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #1a3a1a;
  border-radius: 4px;
  color: #669966;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.coll-filter-btn:hover {
  color: #00cc33;
  border-color: var(--accent, #00cc33);
  background: rgba(0, 40, 0, 0.4);
}

.coll-filter-btn.active {
  color: #000;
  background: var(--accent, #00ff41);
  border-color: var(--accent, #00ff41);
  text-shadow: none;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #00ff41) 40%, transparent);
}

/* Sidebar sell zone */
.coll-sidebar-sell {
  margin-top: auto;
  border-bottom: none !important;
}

.coll-sell-zone {
  border: 2px dashed #440000;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s;
  background: rgba(40, 0, 0, 0.15);
  cursor: default;
}

.coll-sell-zone .coll-sell-icon {
  font-size: 24px;
  margin-bottom: 4px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.coll-sell-zone .coll-sell-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #660000;
  letter-spacing: 2px;
  margin-bottom: 4px;
  transition: color 0.3s;
}

.coll-sell-zone .coll-sell-hint {
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #443333;
  transition: color 0.3s;
}

.coll-sell-zone.drag-active {
  border-color: #ff4444;
  background: rgba(80, 0, 0, 0.2);
  animation: sellPulse 1s ease-in-out infinite;
}

.coll-sell-zone.drag-active .coll-sell-icon { opacity: 1; }
.coll-sell-zone.drag-active .coll-sell-text { color: #ff4444; }
.coll-sell-zone.drag-active .coll-sell-hint { color: #ff6666; }

.coll-sell-zone.drag-hover {
  border-color: #ff6666;
  background: rgba(120, 0, 0, 0.3);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.2), inset 0 0 20px rgba(255, 0, 0, 0.05);
  transform: scale(1.02);
}

@keyframes sellPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.1); }
  50% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.3); }
}

/* === MAIN CONTENT === */
.coll-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

.coll-main::-webkit-scrollbar { width: 6px; }
.coll-main::-webkit-scrollbar-track { background: #001a00; }
.coll-main::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 3px; }

/* Header */
.coll-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.coll-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.coll-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: #00ff41;
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
  margin: 0;
}

.coll-subtitle {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: #006b1f;
}

/* Rarity pills */
.coll-header-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.coll-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--pill-color) 50%, transparent);
  background: color-mix(in srgb, var(--pill-color) 10%, transparent);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--pill-color);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.coll-pill:hover {
  background: color-mix(in srgb, var(--pill-color) 20%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--pill-color) 30%, transparent);
}

.coll-pill-count {
  font-weight: bold;
}

/* Filter bar */
.coll-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.coll-search {
  flex: 1;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #1a3a1a;
  border-radius: 4px;
  color: #00ff41;
  font-family: 'VT323', monospace;
  font-size: 18px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.coll-search::placeholder {
  color: #004d15;
}

.coll-search:focus {
  border-color: #00ff41;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.15), inset 0 0 10px rgba(0, 255, 65, 0.03);
}

.coll-sort-select {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #1a3a1a;
  border-radius: 4px;
  color: #00ff41;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.coll-sort-select option {
  background: #001a00;
  color: #00ff41;
}

.coll-sort-select:focus {
  border-color: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

.coll-reset-btn {
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #440000;
  border-radius: 4px;
  color: #884444;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.coll-reset-btn:hover {
  color: #ff4444;
  border-color: #ff4444;
  background: rgba(60, 0, 0, 0.3);
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
}

/* Results bar */
.coll-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  min-height: 20px;
}

.coll-results-count {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #00cc33;
  opacity: 0;
  transition: opacity 0.3s;
}

.coll-results-count.visible {
  opacity: 1;
}

/* Card grid — uses existing .collection-card styles */
body.collection-page .coll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 4px;
}

/* Empty states */
.coll-empty {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #006b1f;
  text-align: center;
  margin-top: 60px;
}

.coll-empty.hidden {
  display: none;
}

/* Sell overlay */
body.collection-page .sell-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

body.collection-page .sell-overlay.hidden {
  display: none;
}

body.collection-page .sell-card-container {
  animation: sellCardShrink 1.8s ease-in forwards;
}

@keyframes sellCardShrink {
  0% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.1) rotate(2deg); opacity: 1; }
  100% { transform: scale(0) rotate(20deg); opacity: 0; }
}

body.collection-page .sell-price-popup {
  font-family: 'Press Start 2P', monospace;
  font-size: 24px;
  color: #ffcc00;
  text-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
  animation: sellPricePopup 1.8s ease-out forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

@keyframes sellPricePopup {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

body.collection-page .screen-flash {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 3000;
  pointer-events: none;
}

body.collection-page .screen-flash.hidden { display: none; }
body.collection-page .screen-flash.flash-active {
  animation: flashAnim 0.4s ease-out forwards;
}

@keyframes flashAnim {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Dragging state */
.collection-card.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.selling-locked {
  pointer-events: none;
  opacity: 0.5;
}

/* === COLLECTION DASHBOARD RESPONSIVE === */
@media (max-width: 1100px) {
  .coll-sidebar {
    width: 200px;
    min-width: 200px;
  }
  .coll-title {
    font-size: 14px;
  }
  .coll-main {
    padding: 16px 18px;
  }
}

@media (max-width: 900px) {
  .coll-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 56px);
  }
  body.collection-page {
    overflow: auto;
  }
  .coll-sidebar {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid #1a3a1a;
    overflow-y: visible;
    max-height: none;
  }
  .coll-sidebar-section {
    flex: 1 1 200px;
    border-bottom: none;
    border-right: 1px solid #1a3a1a;
  }
  .coll-sidebar-sell {
    flex: 1 1 100%;
    border-right: none;
  }
  .coll-main {
    overflow-y: visible;
    flex: 1;
  }
  .coll-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .coll-filter-bar {
    flex-wrap: wrap;
  }
  .coll-search {
    min-width: 180px;
  }
}

@media (max-width: 600px) {
  .coll-sidebar {
    flex-direction: column;
  }
  .coll-sidebar-section {
    border-right: none;
    border-bottom: 1px solid #1a3a1a;
  }
  .coll-filter-bar {
    flex-direction: column;
  }
  .coll-sort-select, .coll-reset-btn {
    width: 100%;
  }
  .coll-header-pills {
    gap: 4px;
  }
  .coll-pill {
    font-size: 7px;
    padding: 3px 8px;
  }
  body.collection-page .coll-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

/* ==============================
   PAGE DECK BUILDER
   ============================== */
.deck-wrapper { width: 900px; max-width: 95vw; }

.deck-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.deck-item {
  padding: 16px 20px; background: rgba(0, 20, 0, 0.8); border: 1px solid #004d15;
  border-radius: 8px; cursor: pointer; transition: all 0.3s;
  display: flex; flex-direction: column; gap: 6px;
}
.deck-item:hover { border-color: #00ff41; box-shadow: 0 0 15px rgba(0,255,65,0.2); }
.deck-item-pvp { border-color: #ffaa00; }
.deck-item-name {
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: #00ff41;
  display: flex; align-items: center; gap: 8px;
}
.deck-pvp-badge {
  font-size: 8px; background: #ffaa00; color: #000; padding: 2px 6px; border-radius: 3px;
}
.deck-item-count { font-family: 'VT323', monospace; font-size: 16px; color: #006b1f; }
.deck-item-preview { font-size: 18px; letter-spacing: 4px; }
.deck-empty {
  text-align: center; padding: 30px; color: #006b1f;
  font-family: 'VT323', monospace; font-size: 20px;
}
.deck-new-btn { margin: 0 auto; display: block; }

/* Editeur */
.deck-editor { margin-top: 20px; }
.deck-editor-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.deck-name-input {
  background: rgba(0, 15, 0, 0.8); border: 1px solid #004d15; border-radius: 4px;
  padding: 8px 14px; color: #00ff41; font-family: 'VT323', monospace; font-size: 20px;
  outline: none; width: 250px;
}
.deck-name-input:focus { border-color: #00ff41; box-shadow: 0 0 8px rgba(0,255,65,0.2); }
.deck-counter {
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: #00ff41;
}
.deck-counter-detail {
  font-size: 9px; color: #006b1f; margin-left: 8px;
}

/* Slots */
.deck-slots {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px;
  margin-bottom: 16px; padding: 12px;
  background: rgba(0, 10, 0, 0.6); border: 1px solid #003300; border-radius: 8px;
}
.deck-slot {
  aspect-ratio: 1; border-radius: 6px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 10px;
  transition: all 0.2s; position: relative;
}
.deck-slot.empty {
  border: 1px dashed #004d15; color: #004d15; font-size: 18px; cursor: default;
}
.deck-slot.filled {
  border: 2px solid; background: rgba(0, 20, 0, 0.9); cursor: pointer;
}
.deck-slot.filled:hover { transform: scale(1.1); z-index: 2; }
.deck-slot-objet { border-style: dashed !important; }
.deck-slot-emoji { font-size: 22px; }
.deck-slot-mana {
  position: absolute; bottom: 1px; right: 3px;
  font-family: 'Press Start 2P', monospace; font-size: 6px; color: #ffaa00;
}

/* Filtres */
.deck-filters { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.deck-search {
  background: rgba(0, 15, 0, 0.8); border: 1px solid #004d15; border-radius: 4px;
  padding: 6px 12px; color: #00ff41; font-family: 'VT323', monospace; font-size: 18px;
  outline: none; width: 100%;
}
.deck-search:focus { border-color: #00ff41; }
.deck-filter-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Grille de cartes */
.deck-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px;
  max-height: 400px; overflow-y: auto; padding: 8px;
  background: rgba(0, 10, 0, 0.4); border: 1px solid #003300; border-radius: 8px;
  margin-bottom: 16px;
}
.deck-card {
  padding: 10px 8px; border: 2px solid; border-radius: 6px;
  background: rgba(0, 20, 0, 0.9); cursor: pointer; transition: all 0.2s;
  text-align: center; position: relative;
}
.deck-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.deck-card-selected { opacity: 0.4; }
.deck-card-objet { border-style: dashed; }
.deck-card-emoji { font-size: 28px; margin-bottom: 4px; }
.deck-card-name {
  font-family: 'Press Start 2P', monospace; font-size: 7px; color: #00ff41;
  margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.deck-card-mana {
  font-family: 'VT323', monospace; font-size: 14px; color: #ffaa00;
}
.deck-card-stats {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
}
.deck-card-desc {
  font-family: 'VT323', monospace; font-size: 12px; color: #888;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.deck-card-badge {
  position: absolute; top: 3px; right: 3px;
  font-family: 'Press Start 2P', monospace; font-size: 6px; padding: 1px 4px; border-radius: 2px;
}
.deck-card-badge.shiny { background: #ff66ff; color: #000; }
.deck-card-badge.fused { background: #00ccff; color: #000; }
.deck-card-check {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 28px; color: #00ff41; text-shadow: 0 0 10px #00ff41;
}

/* Actions */
.deck-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.deck-pvp-btn { background: rgba(255, 170, 0, 0.1); border-color: #ffaa00; color: #ffaa00; }
.deck-pvp-btn:hover { background: rgba(255, 170, 0, 0.2); }
.deck-delete-btn { border-color: #ff4444; color: #ff4444; background: rgba(255, 68, 68, 0.05); }
.deck-delete-btn:hover { background: rgba(255, 68, 68, 0.15); }
.deck-cancel-btn { border-color: #666; color: #666; }
.deck-cancel-btn:hover { border-color: #aaa; color: #aaa; }

@media (max-width: 600px) {
  .deck-slots { grid-template-columns: repeat(5, 1fr); }
  .deck-card-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .deck-slot-emoji { font-size: 18px; }
}

/* === BOUTON RETOUR === */
.back-btn {
  position: fixed; top: 20px; left: 20px; background: none;
  border: 1px solid #004d15; color: #006b1f; font-family: 'VT323', monospace;
  font-size: 18px; padding: 6px 14px; cursor: pointer; transition: all 0.2s; z-index: 10;
}
.back-btn:hover { border-color: #00ff41; color: #00ff41; box-shadow: 0 0 10px rgba(0, 255, 65, 0.3); }

.credits-display {
  position: fixed; top: 20px; right: 20px;
  font-family: 'Press Start 2P', monospace; font-size: 12px; color: #00cc33; z-index: 10;
  border: 1px solid #004d15; padding: 8px 14px; background: rgba(0, 10, 0, 0.8);
}
.credits-display span { color: #00ff41; text-shadow: 0 0 8px #00ff41; }

/* ==============================
   PAGE BOUTIQUE - PLEIN ECRAN
   ============================== */

.shop-view {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px;
  min-height: calc(100vh - 60px); padding: 20px;
}
.boosters-shelf { display: flex; gap: 30px; justify-content: center; align-items: center; }

/* Bonus du jour - boutique */
.shop-daily {
  display: flex; align-items: center; gap: 16px;
  background: rgba(0, 20, 0, 0.7); border: 1px solid #1a3a1a;
  border-radius: 8px; padding: 14px 24px; max-width: 500px; width: 100%;
  transition: all 0.3s ease;
}
.shop-daily:not(.daily-claimed):hover {
  border-color: #00ff41; box-shadow: 0 0 15px rgba(0, 255, 65, 0.15);
}
.shop-daily.daily-claimed { opacity: 0.4; }
.shop-daily-icon { font-size: 32px; flex-shrink: 0; }
.shop-daily-info { flex: 1; }
.shop-daily-title {
  font-family: 'Press Start 2P', monospace; font-size: 11px;
  color: #ffaa00; margin: 0 0 4px;
}
.shop-daily-desc {
  font-family: 'VT323', monospace; font-size: 16px; color: #888; margin: 0;
}
.shop-daily-btn {
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  color: #00ff41; background: rgba(0, 255, 65, 0.1);
  border: 1px solid #00ff41; border-radius: 4px;
  padding: 8px 14px; cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.shop-daily-btn:hover:not(:disabled) {
  background: rgba(0, 255, 65, 0.2); box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}
.shop-daily-btn.daily-claimed {
  color: #444; border-color: #333; background: transparent; cursor: default;
}

.booster-full {
  position: relative; cursor: pointer; transition: all 0.3s ease;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
}
.booster-full:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(0, 255, 65, 0.4), 0 0 100px rgba(0, 255, 65, 0.15);
}
.booster-full:active { transform: scale(0.97); }

.booster-full-img {
  display: block; height: 70vh; max-height: 550px; width: auto;
  border-radius: 10px; user-select: none; -webkit-user-drag: none;
}

.booster-price-tag {
  position: absolute; bottom: 0; left: 0; right: 0; text-align: center;
  font-family: 'Press Start 2P', monospace; font-size: 14px; color: #00ff41;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9) 40%);
  padding: 20px 0 12px; text-shadow: 0 0 15px #00ff41;
}

/* ==============================
   ANIMATION DECHIRURE
   ============================== */

.opening-view { display: flex; justify-content: center; align-items: center; width: 100%; }

.tear-container {
  position: relative; width: auto; height: 70vh; max-height: 550px;
  display: flex; justify-content: center;
}

.tear-half {
  width: 200px; height: 100%;
  background-size: auto 100%; background-repeat: no-repeat;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.tear-left {
  background-position: left center;
  clip-path: polygon(0 0, 100% 0, 95% 15%, 100% 30%, 92% 45%, 100% 55%, 94% 70%, 100% 85%, 97% 100%, 0 100%);
}
.tear-right {
  background-position: right center;
  clip-path: polygon(5% 0, 100% 0, 100% 100%, 3% 100%, 6% 85%, 0% 70%, 8% 55%, 0% 45%, 5% 30%, 0% 15%);
}
.tear-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 100%;
  background: radial-gradient(ellipse, rgba(0, 255, 65, 0.6) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.4s;
}

.tear-container.shaking { animation: boosterShake 0.12s infinite alternate; }

@keyframes boosterShake {
  0% { transform: translate(-2px, -1px) rotate(-0.5deg); }
  25% { transform: translate(2px, 1px) rotate(0.5deg); }
  50% { transform: translate(-1px, 2px) rotate(-0.3deg); }
  75% { transform: translate(1px, -2px) rotate(0.3deg); }
  100% { transform: translate(2px, -1px) rotate(0.5deg); }
}

.tear-container.tearing .tear-left { transform: translateX(-120px) rotate(-8deg); opacity: 0; }
.tear-container.tearing .tear-right { transform: translateX(120px) rotate(8deg); opacity: 0; }
.tear-container.tearing .tear-glow { opacity: 1; width: 300px; }

.screen-flash {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: white; z-index: 2000; pointer-events: none; opacity: 0;
}
.screen-flash.flash-active { animation: flashBang 0.4s ease-out; }
@keyframes flashBang { 0% { opacity: 0.9; } 100% { opacity: 0; } }

.shake { animation: screenShake 0.5s ease; }
@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px); } 30% { transform: translateX(8px); }
  45% { transform: translateX(-6px); } 60% { transform: translateX(6px); }
  75% { transform: translateX(-3px); } 90% { transform: translateX(3px); }
}

/* ==============================
   REVEAL DES CARTES
   ============================== */

.reveal-scene { text-align: center; width: 950px; max-width: 95vw; }

.reveal-title {
  font-family: 'Press Start 2P', monospace; font-size: 20px; color: #00ff41;
  margin-bottom: 24px; animation: textShadowGlow 2s ease-in-out infinite; transition: color 0.3s;
}

.cards-reveal {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 24px; min-height: 320px; align-items: flex-end;
}

/* ==============================
   CARTE - COMPOSANT
   ============================== */

.reveal-card {
  width: 170px; height: 310px;
  perspective: 1000px; cursor: default;
}

.reveal-card.waiting { opacity: 0; transform: translateY(-60px); }

.reveal-card.card-slam {
  animation: cardSlam 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardSlam {
  0% { opacity: 0; transform: translateY(-80px) scale(1.3); }
  70% { opacity: 1; transform: translateY(5px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.card-inner {
  width: 100%; height: 100%; position: relative;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-slam .card-inner { transform: rotateY(180deg); }
.revealed .card-inner { transform: rotateY(0deg); }

.card-back, .card-front {
  position: absolute; width: 100%; height: 100%;
  backface-visibility: hidden; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.card-back {
  background: linear-gradient(135deg, #000d00 0%, #002200 25%, #003300 50%, #002200 75%, #000d00 100%);
  border: 2px solid #00ff41; transform: rotateY(180deg); overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,255,65,0.08);
}
.card-back span {
  font-size: 48px; font-family: 'Press Start 2P', monospace;
  color: #00ff41; text-shadow: 0 0 20px #00ff41, 0 0 40px rgba(0,255,65,0.3);
  z-index: 1; animation: cardBackPulse 2s ease-in-out infinite;
}
@keyframes cardBackPulse {
  0%, 100% { text-shadow: 0 0 20px #00ff41, 0 0 40px rgba(0,255,65,0.3); transform: scale(1); }
  50% { text-shadow: 0 0 30px #00ff41, 0 0 60px rgba(0,255,65,0.5); transform: scale(1.05); }
}
.card-back-pattern {
  position: absolute; width: 100%; height: 100%;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0, 255, 65, 0.04) 6px, rgba(0, 255, 65, 0.04) 12px),
    repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0, 255, 65, 0.04) 6px, rgba(0, 255, 65, 0.04) 12px),
    radial-gradient(ellipse at center, rgba(0,255,65,0.08) 0%, transparent 70%);
}
/* Inner border dos de carte */
.card-back::after {
  content: ''; position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid rgba(0,255,65,0.15); border-radius: 2px;
  pointer-events: none; z-index: 0;
}

.card-front {
  background: rgba(0, 8, 0, 0.95); border: 2px solid #00ff41;
  padding: 0; gap: 0; justify-content: flex-start; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,255,65,0.15);
}
/* Double bordure interieure */
.card-front::before {
  content: ''; position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  border: 1px solid rgba(0,255,65,0.1); border-radius: 3px;
  pointer-events: none; z-index: 7;
}
/* Texture noise */
.card-front::after {
  content: ''; position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 6; opacity: 0.4; border-radius: 6px;
}

.card-rarity {
  width: 100%; text-align: center;
  font-family: 'Press Start 2P', monospace; font-size: 6px; padding: 3px 0;
  color: #000; letter-spacing: 1px; flex-shrink: 0;
}

.card-visual {
  width: 100%; height: 110px; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}

.card-visual img {
  width: 100%; height: 100%; object-fit: cover;
  position: relative; z-index: 1;
}

.card-visual-watermark {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 70px; opacity: 0.06; z-index: 0;
  pointer-events: none; filter: blur(1px);
}

.card-visual-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px;
  position: relative;
}

.card-visual-fallback::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.15;
}

.card-visual-fallback.elem-feu     { background: linear-gradient(180deg, #1a0000 0%, #330000 50%, #1a0500 100%); }
.card-visual-fallback.elem-eau     { background: linear-gradient(180deg, #000a1a 0%, #001133 50%, #000a1a 100%); }
.card-visual-fallback.elem-terre   { background: linear-gradient(180deg, #0a1a00 0%, #1a3300 50%, #0a1a00 100%); }
.card-visual-fallback.elem-lumiere { background: linear-gradient(180deg, #1a1500 0%, #332800 50%, #1a1500 100%); }
.card-visual-fallback.elem-ombre   { background: linear-gradient(180deg, #0d0015 0%, #1a0033 50%, #0d0015 100%); }

.card-name {
  font-family: 'Press Start 2P', monospace; font-size: 8px; color: #00ff41;
  text-align: center; margin: 4px 0 2px; flex-shrink: 0; padding: 0 4px;
}

.card-element {
  font-size: 11px; flex-shrink: 0; padding: 1px 6px;
  border-radius: 3px; margin: 1px 0;
}

.card-stats-row {
  display: flex; flex-direction: column; gap: 3px; width: 90%;
  flex-shrink: 0; margin: 4px 0; padding: 0 4px;
}

.stat-bar {
  display: flex; align-items: center; gap: 4px; width: 100%;
}

.stat-bar-label {
  font-family: 'Press Start 2P', monospace; font-size: 6px;
  width: 28px; text-align: right; flex-shrink: 0;
}

.stat-bar-track {
  flex: 1; height: 7px; background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden; position: relative;
  border: 1px solid rgba(255,255,255,0.04);
}

.stat-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.8s ease-out;
}

.stat-bar-val {
  font-family: 'Press Start 2P', monospace; font-size: 6px;
  width: 18px; text-align: left; flex-shrink: 0;
}

.stat-atk .stat-bar-label, .stat-atk .stat-bar-val { color: #ff4444; }
.stat-atk .stat-bar-fill { background: linear-gradient(90deg, #ff2222, #ff6644); box-shadow: 0 0 6px rgba(255,68,68,0.5); }

.stat-def .stat-bar-label, .stat-def .stat-bar-val { color: #4488ff; }
.stat-def .stat-bar-fill { background: linear-gradient(90deg, #2266ff, #44aaff); box-shadow: 0 0 6px rgba(68,136,255,0.5); }

.stat-hp .stat-bar-label, .stat-hp .stat-bar-val { color: #44dd44; }
.stat-hp .stat-bar-fill { background: linear-gradient(90deg, #22bb22, #66ff44); box-shadow: 0 0 6px rgba(68,221,68,0.5); }

.card-sep { width: 80%; height: 1px; background: currentColor; opacity: 0.2; margin: 2px 0; flex-shrink: 0; }

.card-ability {
  text-align: center; flex-shrink: 0; padding: 4px 6px;
  margin: 0 4px;
  border: 1px solid rgba(204,68,255,0.15);
  border-radius: 3px;
  background: rgba(204,68,255,0.03);
}
.ability-name { font-family: 'Press Start 2P', monospace; font-size: 6px; color: #cc44ff; text-shadow: 0 0 6px rgba(204, 68, 255, 0.3); }
.ability-cost { font-size: 11px; color: #44aaff; }
.ability-desc { font-size: 11px; color: #009933; line-height: 1.2; }

.card-type { font-size: 10px; color: #006b1f; text-transform: uppercase; flex-shrink: 0; margin-top: auto; padding-bottom: 4px; }

/* === EFFETS RARITY REVEAL === */
.legendary-reveal { animation: legendaryShine 1.5s ease-in-out infinite; }
@keyframes legendaryShine {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 10px rgba(255, 170, 0, 0.5)); }
  50% { filter: brightness(1.3) drop-shadow(0 0 30px rgba(255, 170, 0, 1)); }
}

.epic-reveal { animation: epicShine 2s ease-in-out infinite; }
@keyframes epicShine {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 6px rgba(204, 68, 255, 0.4)); }
  50% { filter: brightness(1.15) drop-shadow(0 0 20px rgba(204, 68, 255, 0.8)); }
}

/* === SHINY REVEAL === */
.shiny-reveal { animation: shinyShine 1s ease-in-out infinite; }
@keyframes shinyShine {
  0%, 100% { filter: brightness(1.1) drop-shadow(0 0 10px rgba(255, 100, 255, 0.6)); }
  50% { filter: brightness(1.4) drop-shadow(0 0 30px rgba(255, 100, 255, 1)); }
}

.opening-done-btn { width: 300px; margin: 0 auto; display: block; }

/* ==============================
   CLICK-TO-REVEAL SYSTEM
   ============================== */

.reveal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.reveal-all-btn {
  width: 250px;
  margin: 0 auto;
  display: block;
  border-color: #006b1f !important;
  color: #006b1f !important;
  font-size: 12px;
}
.reveal-all-btn:hover {
  border-color: #00ff41 !important;
  color: #00ff41 !important;
  box-shadow: 0 0 15px rgba(0,255,65,0.2);
}

/* Carte cliquable (face cachee, en attente de click) */
.reveal-card.clickable {
  cursor: pointer;
  animation: cardWiggle 2.5s ease-in-out infinite;
}

.reveal-card.clickable:nth-child(2) { animation-delay: 0.2s; }
.reveal-card.clickable:nth-child(3) { animation-delay: 0.4s; }
.reveal-card.clickable:nth-child(4) { animation-delay: 0.6s; }
.reveal-card.clickable:nth-child(5) { animation-delay: 0.8s; }

@keyframes cardWiggle {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  20% { transform: rotate(-0.6deg) translateY(-2px); }
  40% { transform: rotate(0.6deg) translateY(-1px); }
  60% { transform: rotate(-0.3deg) translateY(-2px); }
  80% { transform: rotate(0.3deg) translateY(0); }
}

.reveal-card.clickable:hover {
  transform: translateY(-8px) scale(1.05) !important;
  animation: none;
  transition: transform 0.25s ease-out;
}

.reveal-card.clickable:hover .card-back {
  box-shadow: 0 0 30px rgba(0,255,65,0.5), 0 0 60px rgba(0,255,65,0.2);
  border-color: #44ff88;
}

.reveal-card.clickable .card-back {
  animation: backGlow 1.8s ease-in-out infinite;
}

@keyframes backGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,255,65,0.15); }
  50% { box-shadow: 0 0 25px rgba(0,255,65,0.4), 0 0 50px rgba(0,255,65,0.1); }
}

/* ==============================
   PAGE COLLECTION
   ============================== */

.collection-wrapper {
  text-align: center; width: 1050px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
  padding-bottom: 20px;
}

.collection-wrapper::-webkit-scrollbar { width: 6px; }
.collection-wrapper::-webkit-scrollbar-track { background: #001a00; }
.collection-wrapper::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 3px; }

.shop-subtitle { font-size: 20px; color: #00cc33; margin-bottom: 20px; }

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px; padding: 10px;
}

.collection-card {
  background: rgba(0, 8, 0, 0.95); border: 2px solid; border-radius: 6px;
  padding: 0; display: flex; flex-direction: column; align-items: center;
  gap: 0; transition: all 0.2s; min-height: 300px; position: relative; overflow: hidden;
}
.collection-card:hover { transform: translateY(-4px) scale(1.03); }

.collection-card .card-count {
  font-family: 'Press Start 2P', monospace; font-size: 9px; color: #00ff41;
  padding: 2px 8px; border: 1px solid #00ff41; border-radius: 3px;
  position: absolute; top: 22px; right: 6px; z-index: 2;
  background: rgba(0, 0, 0, 0.7);
}

.collection-empty { font-size: 22px; color: #006b1f; margin-top: 40px; }

/* ==============================
   STATS D'INVENTAIRE
   ============================== */

.collection-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0 16px;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 5px 10px;
  border: 1px solid #004d15;
  border-radius: 20px;
  background: rgba(0, 20, 0, 0.6);
  color: #00cc33;
  white-space: nowrap;
}

.stat-chip .stat-icon { font-size: 12px; }

.stat-chip.stat-total { border-color: #00ff41; color: #00ff41; }
.stat-chip.stat-commune { border-color: #888; color: #888; }
.stat-chip.stat-rare { border-color: #4488ff; color: #4488ff; }
.stat-chip.stat-epique { border-color: #cc44ff; color: #cc44ff; }
.stat-chip.stat-legendaire { border-color: #ffaa00; color: #ffaa00; }
.stat-chip.stat-shiny {
  border-color: #ff66ff;
  color: #ff66ff;
  background: rgba(40, 0, 40, 0.4);
}

/* ==============================
   TOOLBAR COLLECTION (FILTRES)
   ============================== */

.collection-toolbar {
  background: rgba(0, 10, 0, 0.8);
  border: 1px solid #003300;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.filter-row.search-row {
  margin-bottom: 4px;
}

.filter-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #006b1f;
  min-width: 65px;
  text-align: right;
  padding-right: 6px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #004d15;
  border-radius: 4px;
  color: #00ff41;
  font-family: 'VT323', monospace;
  font-size: 18px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: #004d15;
}

.search-input:focus {
  border-color: #00ff41;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.2), inset 0 0 10px rgba(0, 255, 65, 0.05);
}

.filter-btn {
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #003300;
  border-radius: 4px;
  color: #006b1f;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-btn:hover {
  color: #00cc33;
  border-color: #00cc33;
  background: rgba(0, 40, 0, 0.4);
}

.filter-btn.active {
  color: #000;
  background: #00ff41;
  border-color: #00ff41;
  text-shadow: none;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.filter-btn.filter-toggle {
  border-style: dashed;
}

.filter-btn.filter-toggle.active {
  border-style: solid;
}

.filter-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-special {
  display: flex;
  gap: 6px;
}

.filter-sort {
  margin-left: auto;
}

.sort-select {
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #004d15;
  border-radius: 4px;
  color: #00ff41;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  outline: none;
}

.sort-select option {
  background: #001a00;
  color: #00ff41;
}

.sort-select:focus {
  border-color: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

/* Compteur resultats */
.filter-result-count {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #00cc33;
  text-align: center;
  padding: 4px 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.filter-result-count.visible {
  opacity: 1;
}

/* ==============================
   ANIMATION APPARITION CARTES
   ============================== */

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-appear {
  opacity: 0;
  animation: cardAppear 0.35s ease-out forwards;
}

/* ==============================
   RESPONSIVE COLLECTION TOOLBAR
   ============================== */

@media (max-width: 600px) {
  .collection-toolbar {
    padding: 8px;
    gap: 8px;
  }

  .filter-label {
    min-width: unset;
    width: 100%;
    text-align: left;
    padding-right: 0;
    margin-bottom: 2px;
  }

  .filter-row {
    gap: 4px;
  }

  .filter-btn {
    font-size: 7px;
    padding: 4px 7px;
  }

  .stat-chip {
    font-size: 7px;
    padding: 4px 7px;
  }

  .filter-row-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-sort {
    margin-left: 0;
  }

  .sort-select {
    width: 100%;
  }
}

/* ==============================
   BADGES SHINY / FUSED
   ============================== */

.card-badge {
  position: absolute; z-index: 6;
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  padding: 2px 6px; border-radius: 3px;
}

.badge-shiny {
  top: 22px; left: 6px;
  color: #000; background: linear-gradient(135deg, #ff66ff, #ffaa00, #66ff66, #6666ff, #ff66ff);
  background-size: 300% 300%;
  animation: shinyBadgePulse 2s ease-in-out infinite;
  text-shadow: none;
}

@keyframes shinyBadgePulse {
  0%, 100% { background-position: 0% 50%; filter: brightness(1); }
  50% { background-position: 100% 50%; filter: brightness(1.3); }
}

.badge-fused {
  top: 22px; left: 6px;
  color: #000; background: #00cccc;
  animation: fusedBadgePulse 2s ease-in-out infinite;
}

.card-badge.badge-shiny + .badge-fused {
  top: 38px;
}

@keyframes fusedBadgePulse {
  0%, 100% { box-shadow: 0 0 4px rgba(0,204,204,0.4); }
  50% { box-shadow: 0 0 12px rgba(0,204,204,0.8); }
}

/* Shiny card borders */
.collection-card-shiny {
  border-color: #ff66ff !important;
  box-shadow: 0 0 15px rgba(255, 102, 255, 0.4), 0 0 30px rgba(255, 170, 0, 0.2) !important;
}

.collection-card-shiny.card-appear {
  animation: cardAppear 0.35s ease-out forwards, shinyCardBorder 3s linear 0.35s infinite;
}

.collection-card-shiny:not(.card-appear) {
  animation: shinyCardBorder 3s linear infinite;
}

@keyframes shinyCardBorder {
  0% { box-shadow: 0 0 15px rgba(255, 102, 255, 0.5), 0 0 30px rgba(255, 170, 0, 0.2); border-color: #ff66ff; }
  33% { box-shadow: 0 0 15px rgba(255, 170, 0, 0.5), 0 0 30px rgba(102, 255, 102, 0.2); border-color: #ffaa00; }
  66% { box-shadow: 0 0 15px rgba(102, 102, 255, 0.5), 0 0 30px rgba(255, 102, 255, 0.2); border-color: #6666ff; }
  100% { box-shadow: 0 0 15px rgba(255, 102, 255, 0.5), 0 0 30px rgba(255, 170, 0, 0.2); border-color: #ff66ff; }
}

/* Fused card borders */
.collection-card-fused {
  border-color: #00cccc !important;
  box-shadow: 0 0 15px rgba(0,204,204,0.4) !important;
  animation: fusedCardPulse 2s ease-in-out infinite;
}

@keyframes fusedCardPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0,204,204,0.3); }
  50% { box-shadow: 0 0 25px rgba(0,204,204,0.6); }
}

/* Modal badges */
.modal-badge {
  display: inline-block;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  padding: 3px 8px; border-radius: 4px; margin-right: 6px; margin-bottom: 8px;
}
.modal-badge-shiny {
  color: #000; background: linear-gradient(135deg, #ff66ff, #ffaa00, #66ff66, #6666ff);
}
.modal-badge-fused {
  color: #000; background: #00cccc;
}

.modal-shiny .modal-card-art {
  border-image: linear-gradient(135deg, #ff66ff, #ffaa00, #66ff66, #6666ff, #ff66ff) 1 !important;
}

/* ==============================
   ELEMENT TABLE
   ============================== */

.element-legend {
  display: flex; justify-content: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}

.element-badge {
  font-family: 'VT323', monospace; font-size: 14px;
  padding: 3px 10px; border-radius: 4px;
  border: 1px solid; display: inline-flex; align-items: center; gap: 4px;
}

/* ==============================
   EFFET HOLOGRAPHIQUE
   ============================== */

.card-holo {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 5; border-radius: 6px; opacity: 0;
  transition: opacity 0.3s;
  background: linear-gradient(
    125deg,
    transparent 0%, rgba(255,0,0,0.08) 15%, rgba(255,165,0,0.08) 25%,
    rgba(255,255,0,0.08) 35%, rgba(0,255,0,0.08) 45%, rgba(0,255,255,0.08) 55%,
    rgba(0,0,255,0.08) 65%, rgba(128,0,255,0.08) 75%, transparent 100%
  );
  background-size: 200% 200%;
  mix-blend-mode: screen;
}

.card-holo.holo-epic {
  background: linear-gradient(
    125deg,
    transparent 0%, rgba(150,50,255,0.12) 20%, rgba(255,50,200,0.1) 40%,
    rgba(100,50,255,0.12) 60%, rgba(200,100,255,0.08) 80%, transparent 100%
  );
  background-size: 200% 200%;
}

.card-holo.holo-legendary {
  background: linear-gradient(
    125deg,
    transparent 0%, rgba(255,200,0,0.15) 15%, rgba(255,100,0,0.12) 30%,
    rgba(255,255,100,0.1) 45%, rgba(255,200,50,0.15) 60%,
    rgba(255,150,0,0.12) 75%, transparent 100%
  );
  background-size: 200% 200%;
}

/* Shiny holo — always visible, rainbow */
.card-holo.holo-shiny {
  opacity: 1 !important;
  background: linear-gradient(
    125deg,
    rgba(255,0,0,0.15) 0%, rgba(255,165,0,0.15) 14%, rgba(255,255,0,0.15) 28%,
    rgba(0,255,0,0.15) 42%, rgba(0,255,255,0.15) 57%, rgba(0,0,255,0.15) 71%,
    rgba(128,0,255,0.15) 85%, rgba(255,0,0,0.15) 100%
  );
  background-size: 300% 300%;
  animation: shinyHoloAnim 3s linear infinite;
}

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

/* ==============================
   BORDURES ANIMEES PAR RARETE
   ============================== */

.card-front.rarity-commune  { border: 2px solid #666; }
.card-front.rarity-rare     { border: 2px solid #4488ff; box-shadow: 0 0 8px rgba(68,136,255,0.3); }

.card-front.rarity-epique {
  border: 2px solid #cc44ff;
  box-shadow: 0 0 12px rgba(204,68,255,0.4);
  animation: borderPulseEpic 2s ease-in-out infinite;
}

.card-front.rarity-legendaire {
  border: 2px solid #ffaa00;
  box-shadow: 0 0 15px rgba(255,170,0,0.5);
  animation: borderPulseLegendary 1.5s ease-in-out infinite;
}

@keyframes borderPulseEpic {
  0%, 100% { box-shadow: 0 0 8px rgba(204,68,255,0.3), inset 0 0 4px rgba(204,68,255,0.1); }
  50% { box-shadow: 0 0 20px rgba(204,68,255,0.6), inset 0 0 8px rgba(204,68,255,0.2); }
}

@keyframes borderPulseLegendary {
  0%, 100% { box-shadow: 0 0 10px rgba(255,170,0,0.4), inset 0 0 5px rgba(255,170,0,0.1); }
  50% { box-shadow: 0 0 25px rgba(255,170,0,0.8), inset 0 0 10px rgba(255,170,0,0.3); }
}

/* ==============================
   3D TILT AU HOVER
   ============================== */

.collection-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  cursor: pointer;
}

.collection-card:hover .card-holo {
  opacity: 1;
  animation: holoMove 3s ease-in-out infinite;
}

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

/* ==============================
   POPUP DETAIL CARTE
   ============================== */

.card-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1500;
  display: flex; justify-content: center; align-items: center;
  opacity: 0;
  animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.card-modal {
  display: flex; gap: 30px; align-items: center;
  max-width: 700px; width: 90vw;
  animation: modalSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes modalSlideIn {
  0% { transform: scale(0.8) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-card-art {
  width: 240px; height: 240px;
  border-radius: 10px; overflow: hidden;
  flex-shrink: 0; position: relative;
}

.modal-card-art img {
  width: 100%; height: 100%; object-fit: cover;
}

.modal-card-art .card-visual-fallback {
  width: 100%; height: 100%; font-size: 80px;
}

.modal-card-info {
  flex: 1; text-align: left;
}

.modal-card-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px; margin-bottom: 6px;
}

.modal-card-rarity {
  display: inline-block;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
  padding: 3px 10px; border-radius: 4px; color: #000;
  margin-bottom: 10px;
}

.modal-card-element {
  font-size: 20px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

.modal-stats {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}

.modal-stat-bar {
  display: flex; align-items: center; gap: 8px;
}

.modal-stat-label {
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  width: 36px; text-align: right;
}

.modal-stat-track {
  flex: 1; height: 12px; background: rgba(255,255,255,0.06);
  border-radius: 6px; overflow: hidden;
}

.modal-stat-fill {
  height: 100%; border-radius: 6px;
  transition: width 0.6s ease-out;
}

.modal-stat-val {
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  width: 24px;
}

.modal-ability {
  border: 1px solid rgba(204,68,255,0.3);
  border-radius: 6px; padding: 10px; margin-bottom: 14px;
  background: rgba(204,68,255,0.05);
}

.modal-ability-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}

.modal-ability-name {
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  color: #cc44ff;
}

.modal-ability-cost {
  font-size: 16px; color: #44aaff;
}

.modal-ability-desc {
  font-size: 18px; color: #00cc33; line-height: 1.3;
}

.modal-type {
  font-size: 16px; color: #006b1f; text-transform: uppercase;
}

.modal-close {
  position: absolute; top: 20px; right: 30px;
  font-family: 'VT323', monospace; font-size: 28px;
  color: #666; background: none; border: none;
  cursor: pointer; z-index: 1501;
  transition: color 0.2s;
}

.modal-close:hover { color: #ff4444; }

/* ==============================
   SYSTEME DE VENTE - DRAG & DROP
   ============================== */

.sell-zone {
  margin: 24px auto 10px;
  padding: 20px 40px;
  border: 3px dashed #ff4444;
  border-radius: 10px;
  background: rgba(255, 0, 0, 0.04);
  text-align: center;
  transition: all 0.3s ease;
  max-width: 400px;
  user-select: none;
}

.sell-zone-icon { font-size: 36px; color: #ff4444; margin-bottom: 4px; transition: transform 0.3s; }
.sell-zone-text { font-family: 'Press Start 2P', monospace; font-size: 14px; color: #ff4444; text-shadow: 0 0 8px rgba(255, 68, 68, 0.3); }
.sell-zone-hint { font-size: 16px; color: #993333; margin-top: 4px; }

.sell-zone.drag-active {
  border-color: #ff6644;
  background: rgba(255, 68, 68, 0.08);
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.2);
  animation: sellZonePulse 1s ease-in-out infinite;
}
.sell-zone.drag-active .sell-zone-icon { transform: scale(1.2); }

.sell-zone.drag-hover {
  border-color: #ff8844;
  background: rgba(255, 136, 68, 0.15);
  box-shadow: 0 0 35px rgba(255, 136, 68, 0.4);
  transform: scale(1.05);
}
.sell-zone.drag-hover .sell-zone-text {
  color: #ffaa44;
  text-shadow: 0 0 15px rgba(255, 170, 68, 0.6);
}

@keyframes sellZonePulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 68, 68, 0.15); }
  50% { box-shadow: 0 0 30px rgba(255, 68, 68, 0.35); }
}

.collection-card[draggable="true"] { cursor: grab; }
.collection-card[draggable="true"]:active { cursor: grabbing; }

.collection-card.dragging {
  opacity: 0.4;
  transform: scale(0.95) !important;
  box-shadow: none !important;
}

.card-sell-badge {
  position: absolute; bottom: 4px; right: 4px;
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  color: #ff6644; background: rgba(0, 0, 0, 0.8);
  border: 1px solid #ff4444; border-radius: 3px;
  padding: 2px 6px; z-index: 6;
  opacity: 0; transition: opacity 0.2s;
}
.collection-card:hover .card-sell-badge { opacity: 1; }

/* ==============================
   ANIMATION DE VENTE (overlay)
   ============================== */

.sell-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85); z-index: 2000;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  pointer-events: none;
}
.sell-overlay.hidden { display: none; }

.sell-card-container {
  width: 170px;
  animation: sellCardDissolve 1.2s ease-in-out forwards;
}
.sell-card-container .collection-card { transform: none !important; cursor: default; }

@keyframes sellCardDissolve {
  0% { opacity: 1; transform: scale(1); filter: brightness(1); }
  30% { opacity: 1; transform: scale(1.1); filter: brightness(2) saturate(0); }
  60% { opacity: 0.7; transform: scale(1.15); filter: brightness(3) saturate(0); }
  100% { opacity: 0; transform: scale(0.5); filter: brightness(5) saturate(0) blur(10px); }
}

.sell-price-popup {
  font-family: 'Press Start 2P', monospace; font-size: 24px;
  color: #44ff44;
  text-shadow: 0 0 20px rgba(68, 255, 68, 0.8), 0 0 40px rgba(68, 255, 68, 0.4);
  opacity: 0;
  animation: pricePopUp 1s ease-out 0.6s forwards;
}

@keyframes pricePopUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.5); }
  50% { opacity: 1; transform: translateY(-10px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-40px) scale(1); }
}

.credits-display.credits-flash { animation: creditsPulse 0.6s ease-out; }

@keyframes creditsPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); color: #44ff44; text-shadow: 0 0 20px #44ff44; }
  100% { transform: scale(1); }
}

.collection-grid.selling-locked .collection-card { pointer-events: none; opacity: 0.6; }
.sell-zone.selling-locked { pointer-events: none; opacity: 0.4; }

/* ==============================
   FUSION PAGE
   ============================== */

.fusion-wrapper {
  text-align: center; width: 950px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
}

.fusion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; padding: 10px; margin-bottom: 20px;
}

.fusion-card {
  background: rgba(0, 8, 0, 0.95); border: 2px solid; border-radius: 6px;
  padding: 0; display: flex; flex-direction: column; align-items: center;
  min-height: 220px; position: relative; overflow: hidden;
  cursor: pointer; transition: all 0.2s;
}
.fusion-card:hover { transform: translateY(-3px) scale(1.03); }
.fusion-card.fusion-selected {
  box-shadow: 0 0 20px rgba(0,255,65,0.5) !important;
  border-color: #00ff41 !important;
}

.fusion-card .card-count {
  font-family: 'Press Start 2P', monospace; font-size: 9px; color: #00ff41;
  padding: 2px 8px; border: 1px solid #00ff41; border-radius: 3px;
  position: absolute; top: 22px; right: 6px; z-index: 2;
  background: rgba(0, 0, 0, 0.7);
}

.fusion-panel {
  border: 2px solid #00ff41; border-radius: 8px;
  padding: 20px; margin: 20px auto; max-width: 600px;
  background: rgba(0, 20, 0, 0.6);
}

.fusion-panel-title {
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  color: #00ff41; margin-bottom: 16px;
}

.fusion-slots {
  display: flex; gap: 10px; justify-content: center; margin-bottom: 20px;
}

.fusion-slot {
  width: 80px; height: 100px; border: 2px solid; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0, 8, 0, 0.8); overflow: hidden;
}
.fusion-slot img { width: 100%; height: 70px; object-fit: cover; }
.fusion-slot-label { font-size: 10px; color: #00cc33; padding: 2px; text-align: center; }

.fusion-btn { max-width: 300px; margin: 0 auto; }

.fusion-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9); z-index: 2000;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}
.fusion-overlay.hidden { display: none; }

.fusion-wheel-container { position: relative; margin-bottom: 20px; }

.fusion-wheel-pointer {
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  font-size: 32px; color: #00ff41; z-index: 10;
  text-shadow: 0 0 10px #00ff41;
}

#fusion-wheel { border-radius: 50%; border: 4px solid #00ff41; }

.fusion-result { text-align: center; }
.fusion-result h2 {
  font-family: 'Press Start 2P', monospace; font-size: 20px; margin-bottom: 20px;
}
.fusion-result-success { animation: textShadowGlow 2s ease-in-out infinite; }
.fusion-result-fail { text-shadow: 0 0 20px rgba(204, 34, 34, 0.5); }

.fusion-fail-text {
  font-size: 22px; color: #cc2222; margin: 20px 0;
}

.fusion-result .collection-card {
  margin: 0 auto 20px; width: 170px;
}

/* ==============================
   COMBAT HUB
   ============================== */

.combat-hub { text-align: center; width: 600px; max-width: 95vw; }

.combat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-top: 30px;
}

.combat-mode-btn {
  padding: 30px 20px; background: rgba(0, 20, 0, 0.8);
  border: 2px solid #00ff41; border-radius: 8px;
  color: #00ff41; cursor: pointer; transition: all 0.3s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%;
}
.combat-mode-btn:hover {
  background: rgba(0, 255, 65, 0.1);
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.3);
  transform: translateY(-3px);
}
.combat-mode-pvp { border-color: #ff4444; color: #ff6644; }
.combat-mode-pvp:hover { box-shadow: 0 0 25px rgba(255,68,68,0.3); background: rgba(40,0,0,0.8); }
.combat-starter-btn { border-color: #ffaa00; color: #ffcc00; margin-top: 12px; }
.combat-starter-btn:hover { box-shadow: 0 0 25px rgba(255,170,0,0.3); background: rgba(40,25,0,0.8); }

.combat-mode-icon { font-size: 48px; }
.combat-mode-label {
  font-family: 'Press Start 2P', monospace; font-size: 16px;
}
.combat-mode-desc {
  font-size: 16px; color: #00cc33;
}

/* Deck select overlay */
.deck-select-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.deck-select-overlay.hidden { display: none; }
.deck-select-modal {
  background: rgba(0, 10, 0, 0.95); border: 2px solid #00ff41;
  border-radius: 12px; padding: 30px; max-width: 500px; width: 90%;
  text-align: center; animation: modalSlideIn 0.3s ease-out;
}
.deck-select-title {
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  color: #00ff41; margin-bottom: 20px;
}
.deck-select-list { display: flex; flex-direction: column; gap: 10px; }
.deck-select-empty { color: #666; font-size: 16px; padding: 20px; }

.deck-select-item {
  padding: 14px; background: rgba(0, 20, 0, 0.8);
  border: 2px solid #004d15; border-radius: 8px;
  color: #00ff41; cursor: pointer; transition: all 0.2s;
  text-align: left; width: 100%;
}
.deck-select-item:hover {
  border-color: #00ff41; background: rgba(0, 40, 0, 0.8);
  box-shadow: 0 0 10px rgba(0,255,65,0.2);
}
.deck-select-name {
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  margin-bottom: 4px;
}
.deck-select-info { font-size: 14px; color: #888; margin-bottom: 4px; }
.deck-select-preview { font-size: 16px; letter-spacing: 2px; }
.deck-pvp-tag {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  color: #ff4444; background: rgba(255,68,68,0.15);
  padding: 2px 4px; border-radius: 3px;
}

.deck-select-or {
  font-family: 'VT323', monospace; font-size: 16px;
  color: #555; margin: 16px 0 4px;
}
.deck-select-cancel {
  margin-top: 16px; background: transparent;
  border: 1px solid #333; color: #666;
  padding: 8px 20px; border-radius: 6px;
  font-family: 'VT323', monospace; font-size: 16px;
  cursor: pointer;
}
.deck-select-cancel:hover { border-color: #ff4444; color: #ff4444; }

/* Loading */
.combat-loading {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8); z-index: 1100;
  display: flex; align-items: center; justify-content: center;
}
.combat-loading.hidden { display: none; }
.loading-text {
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  color: #00ff41; animation: loadingBlink 1s ease-in-out infinite;
}
@keyframes loadingBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ==============================
   CAMPAIGN MAP
   ============================== */

.campaign-wrapper {
  text-align: center; width: 800px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
}

.campaign-map {
  display: flex; flex-direction: column; align-items: center;
  gap: 0; padding: 20px 0;
}

.campaign-node {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; border: 2px solid; border-radius: 8px;
  width: 300px; cursor: pointer; transition: all 0.3s;
  background: rgba(0, 8, 0, 0.8);
}

.campaign-node.node-locked {
  border-color: #333; color: #444; cursor: not-allowed;
  opacity: 0.5;
}
.campaign-node.node-completed {
  border-color: #22cc44; color: #22cc44;
}
.campaign-node.node-available {
  border-color: #00ff41; color: #00ff41;
  animation: nodePulse 2s ease-in-out infinite;
}
.campaign-node.node-available:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,255,65,0.2); }
  50% { box-shadow: 0 0 20px rgba(0,255,65,0.5); }
}

.campaign-node-marker {
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid currentColor; flex-shrink: 0;
}
.campaign-node-label { font-size: 18px; }

.campaign-line {
  width: 3px; height: 20px; background: #333;
  margin: 0 auto;
}
.campaign-line.line-active { background: #00ff41; }

/* Campaign detail */
.campaign-detail {
  border: 2px solid #00ff41; border-radius: 8px;
  padding: 20px; margin-top: 20px;
  background: rgba(0, 20, 0, 0.6);
}

.campaign-node-name {
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  color: #00ff41; margin-bottom: 10px;
}
.campaign-node-info { font-size: 18px; color: #00cc33; margin-bottom: 6px; }
.campaign-node-reward { font-size: 18px; color: #ffaa00; margin-bottom: 16px; }

.campaign-fight-btn { max-width: 300px; margin: 16px auto 0; }

/* ==============================
   TEAM SELECTION
   ============================== */

.team-select-title {
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  color: #00cc33; margin-bottom: 10px;
}

.team-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px; padding: 10px; max-height: 300px; overflow-y: auto;
  margin-bottom: 10px;
}

.team-card {
  background: rgba(0, 8, 0, 0.9); border: 2px solid; border-radius: 6px;
  padding: 6px; cursor: pointer; transition: all 0.2s; text-align: center;
  position: relative;
}
.team-card:hover { transform: scale(1.05); }
.team-card.team-card-selected {
  border-color: #00ff41 !important;
  box-shadow: 0 0 15px rgba(0,255,65,0.5);
}

.team-card-img { width: 100%; height: 60px; object-fit: cover; border-radius: 4px; }
.team-card-name { font-family: 'Press Start 2P', monospace; font-size: 7px; color: #00ff41; margin: 4px 0 2px; }
.team-card-elem { font-size: 14px; }
.team-card-stats { font-family: 'Press Start 2P', monospace; font-size: 7px; }

.team-card-shiny { border-image: linear-gradient(135deg, #ff66ff, #ffaa00, #66ff66, #6666ff) 1; }
.team-card-fused { border-color: #00cccc !important; }

.team-badge-shiny {
  position: absolute; top: 2px; left: 2px;
  font-family: 'Press Start 2P', monospace; font-size: 6px;
  color: #000; background: linear-gradient(135deg, #ff66ff, #ffaa00); padding: 1px 3px; border-radius: 2px;
}
.team-badge-fused {
  position: absolute; top: 2px; right: 2px;
  font-family: 'Press Start 2P', monospace; font-size: 6px;
  color: #000; background: #00cccc; padding: 1px 3px; border-radius: 2px;
}

.team-selected {
  display: flex; gap: 10px; justify-content: center; margin: 10px 0;
}
.team-slot {
  width: 100px; padding: 8px; border: 2px dashed #333;
  border-radius: 6px; font-size: 14px; color: #444; text-align: center;
}
.team-slot.slot-filled {
  border-color: #00ff41; border-style: solid;
  color: #00ff41;
}

/* ==============================
   BATTLE ARENA — REFONTE TACTIQUE
   ============================== */

/* Body override */
body.battle-page {
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  height: 100vh;
  padding: 0;
}

/* ===== TOPBAR ===== */
.bt-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 44px;
  min-height: 44px;
  background: rgba(0, 8, 0, 0.9);
  border-bottom: 1px solid #1a3a1a;
  z-index: 10;
}

.bt-topbar-left, .bt-topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bt-topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.bt-opponent {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #ff6644;
  text-shadow: 0 0 8px rgba(255, 102, 68, 0.3);
}

.bt-turn {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #ffaa00;
  text-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.bt-info-chip {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #669966;
}

.bt-info-deck { color: #6699cc; }
.bt-info-hand { color: #888; }
.bt-energy-enemy { color: #ff8844; font-weight: bold; }
.bt-energy-player { color: #ffcc00; font-weight: bold; }

/* Crystal gauge */
.bt-crystal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #cc88ff;
}
.bt-crystal-bar {
  display: inline-block;
  width: 40px;
  height: 6px;
  background: rgba(100, 40, 140, 0.4);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}
.bt-crystal-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9944ff, #cc88ff);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.bt-crystal-player .bt-crystal-fill { background: linear-gradient(90deg, #aa55ff, #dd99ff); }
.bt-crystal-enemy .bt-crystal-fill { background: linear-gradient(90deg, #884488, #aa66aa); }

/* ===== ARENA (champs + actions) ===== */
.bt-arena {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.bt-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 12px;
  overflow: hidden;
}

/* ===== CHAMPS ===== */
.bt-field {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

.bt-slot {
  position: relative;
  width: 220px;
  min-height: 200px;
  border: 2px dashed rgba(0, 255, 65, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.bt-slot:hover {
  border-color: rgba(0, 255, 65, 0.3);
}

.bt-field--enemy .bt-slot {
  border-color: rgba(255, 68, 68, 0.12);
}

.bt-field--enemy .bt-slot:hover {
  border-color: rgba(255, 68, 68, 0.3);
}

.bt-slot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: #1a2a1a;
}

/* ===== UNITES SUR LE TERRAIN ===== */
.bt-unit {
  padding: 10px;
  border-radius: 8px;
  border: 2px solid;
  background: rgba(0, 8, 0, 0.92);
  transition: box-shadow 0.2s, opacity 0.2s;
  position: relative;
  overflow: hidden;
}

.bt-unit-element {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
  opacity: 0.7;
  line-height: 1;
}

.bt-unit-emoji {
  font-size: 44px;
  margin-bottom: 2px;
  line-height: 1.1;
  text-align: center;
}

.bt-unit-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #00ff41;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.bt-unit-hp {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.bt-unit-hp-icon {
  font-size: 11px;
  flex-shrink: 0;
  line-height: 1;
}

.bt-unit-hpbar {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.bt-unit-hpbar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s;
}

.bt-unit-hp-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  flex-shrink: 0;
  min-width: 45px;
  text-align: right;
}

.bt-unit-stats {
  font-family: 'VT323', monospace;
  font-size: 18px;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 3px 0;
}

.bt-stat-atk { color: #ff4444; }
.bt-stat-def { color: #4488ff; }

.bt-unit-status {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 3px;
  font-size: 13px;
}

.bt-status-icon { font-size: 14px; }
.bt-status-poison { color: #aa44ff; }
.bt-status-stun { color: #ffcc00; }
.bt-status-shield { color: #44cccc; }
.bt-status-mark { color: #ffaa00; }

.bt-unit-ability {
  font-family: 'VT323', monospace;
  color: #cc44ff;
  margin-top: 5px;
  border-top: 1px dashed rgba(204, 68, 255, 0.25);
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bt-unit-ability .bt-ability-label {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bt-unit-ability .bt-ability-desc {
  font-size: 11px;
  color: #776688;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

.bt-unit-ability.bt-ability-used {
  opacity: 0.3;
}

.bt-unit-ability.bt-ability-used .bt-ability-label::after {
  content: ' (utilise)';
  color: #444;
}

/* ===== PASSIVE DISPLAY ===== */
.bt-unit-passive {
  font-family: 'VT323', monospace;
  color: #ffaa44;
  margin-top: 4px;
  border-top: 1px dashed rgba(255, 170, 68, 0.2);
  padding-top: 3px;
}

.bt-unit-passive .bt-passive-label {
  font-size: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

.bt-actions-passive {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: #ffaa44;
  margin-top: 6px;
  padding: 4px 6px;
  background: rgba(255, 170, 68, 0.08);
  border: 1px dashed rgba(255, 170, 68, 0.2);
  border-radius: 4px;
  line-height: 1.3;
}

/* ===== SUMMONING SICKNESS ===== */
.bt-sickness {
  opacity: 0.65;
}

.bt-sickness-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 14px;
  z-index: 5;
  filter: grayscale(0.3);
}

/* ===== AVATARS (PV joueur / ennemi) ===== */
.bt-avatar-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
  min-height: 52px;
}

.bt-avatar-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 8, 0, 0.8);
  border: 2px solid rgba(100, 100, 100, 0.4);
  border-radius: 50px;
  padding: 6px 20px;
  gap: 2px;
  transition: all 0.3s;
  min-width: 100px;
}

.bt-avatar-enemy {
  border-color: rgba(255, 68, 68, 0.3);
}

.bt-avatar-player {
  border-color: rgba(0, 255, 65, 0.3);
}

.bt-avatar-icon {
  font-size: 20px;
}

.bt-avatar-hpbar {
  width: 70px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.bt-avatar-hpbar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}

.bt-avatar-hp-text {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: #aaa;
}

.bt-avatar-targetable {
  border-color: #ff4444 !important;
  animation: btTargetPulse 0.8s infinite;
  cursor: crosshair;
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

.bt-avatar-hit {
  animation: btAvatarHit 0.5s;
}

@keyframes btAvatarHit {
  0% { transform: scale(1); background: rgba(0, 8, 0, 0.8); }
  30% { transform: scale(1.1); background: rgba(255, 0, 0, 0.3); }
  100% { transform: scale(1); background: rgba(0, 8, 0, 0.8); }
}

/* ===== SELECTION / CIBLAGE ===== */
.bt-selected {
  outline: 3px solid #00ff41;
  outline-offset: 3px;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.35);
  animation: btSelectedPulse 1.5s infinite;
}

@keyframes btSelectedPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 255, 65, 0.35); }
  50% { box-shadow: 0 0 25px rgba(0, 255, 65, 0.5); }
}

.bt-targetable {
  outline: 2px dashed #ff4444;
  outline-offset: 3px;
  animation: btTargetPulse 0.8s infinite;
  cursor: crosshair;
}

@keyframes btTargetPulse {
  0%, 100% { outline-color: #ff4444; box-shadow: 0 0 8px rgba(255, 68, 68, 0.2); }
  50% { outline-color: #ff8844; box-shadow: 0 0 16px rgba(255, 136, 68, 0.35); }
}

.bt-attacked {
  opacity: 0.6;
}

/* ===== SEPARATEUR ===== */
.bt-midline {
  width: 90%;
  max-width: 700px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #004d15 20%, #00ff41 50%, #004d15 80%, transparent);
  margin: 2px auto;
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.2);
}

/* ===== PANNEAU D'ACTIONS ===== */
.bt-actions {
  width: 220px;
  min-width: 220px;
  background: rgba(0, 8, 0, 0.95);
  border-left: 1px solid #1a3a1a;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.bt-actions.hidden {
  display: none;
}

.bt-actions-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #00ff41;
  letter-spacing: 2px;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a3a1a;
}

/* Unit info in action panel */
.bt-actions-unit {
  text-align: center;
  padding: 8px;
  background: rgba(0, 20, 0, 0.5);
  border: 1px solid #1a3a1a;
  border-radius: 6px;
}

.bt-actions-unit-emoji {
  font-size: 32px;
  line-height: 1.1;
}

.bt-actions-unit-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #00ff41;
  margin: 4px 0;
}

.bt-actions-unit-hp {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.bt-actions-unit-hp .bt-unit-hpbar {
  flex: 1;
}

.bt-actions-unit-hp .bt-unit-hp-text {
  font-size: 7px;
}

.bt-actions-unit-stats {
  font-family: 'VT323', monospace;
  font-size: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}

/* Action buttons */
.bt-actions-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bt-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #004d15;
  border-radius: 6px;
  background: rgba(0, 20, 0, 0.6);
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.bt-action-btn:hover:not(:disabled) {
  transform: scale(1.02);
}

.bt-action-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.bt-action-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
}

.bt-action-sub {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: #555;
}

.bt-action-btn:disabled .bt-action-sub {
  color: #333;
}

.bt-action-btn--attack {
  border-color: #441100;
  color: #ff6644;
}

.bt-action-btn--attack:hover:not(:disabled) {
  background: rgba(255, 68, 68, 0.1);
  border-color: #ff4444;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.15);
}

.bt-action-btn--ability {
  border-color: #330066;
  color: #cc44ff;
}

.bt-action-btn--ability:hover:not(:disabled) {
  background: rgba(204, 68, 255, 0.1);
  border-color: #cc44ff;
  box-shadow: 0 0 8px rgba(204, 68, 255, 0.15);
}

.bt-actions-ability-name {
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #cc44ff;
  text-align: center;
  padding-top: 6px;
  border-top: 1px dashed #2a1a3a;
}

/* ===== MAIN DU JOUEUR ===== */
.bt-hand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid #1a3a1a;
  background: rgba(0, 8, 0, 0.6);
  min-height: 50px;
}

.bt-hand {
  flex: 1;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 40px;
}

.bt-hand-empty {
  color: #333;
  font-family: 'VT323', monospace;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.bt-end-turn {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  background: linear-gradient(135deg, #004d15, #003300);
  color: #00ff41;
  border: 2px solid #00ff41;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.bt-end-turn:hover {
  background: #006622;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.25);
}

.bt-end-turn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== CARTES EN MAIN ===== */
.bt-card {
  width: 115px;
  padding: 8px 6px;
  background: rgba(0, 8, 0, 0.92);
  border: 2px solid;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
}

.bt-card:hover {
  transform: translateY(-8px) scale(1.03);
  z-index: 5;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.15);
}

.bt-card--selected {
  transform: translateY(-12px) scale(1.05);
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.35);
}

.bt-card--expensive {
  opacity: 0.3;
  filter: grayscale(0.4);
}

.bt-card--objet {
  background: rgba(10, 0, 20, 0.92);
}

.bt-card-element {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 11px;
  line-height: 1;
}

.bt-card-cost {
  position: absolute;
  top: 3px;
  right: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #ffcc00;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 3px;
  border-radius: 3px;
}

.bt-card-emoji {
  font-size: 32px;
  margin: 2px 0;
}

.bt-card-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: #00ff41;
  margin: 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bt-card-stats {
  font-family: 'VT323', monospace;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  padding: 0 4px;
}

.bt-card-stat-atk { color: #ff4444; }
.bt-card-stat-def { color: #4488ff; }
.bt-card-stat-hp { color: #44dd44; }

.bt-card-ability {
  font-family: 'VT323', monospace;
  font-size: 11px;
  color: #cc44ff;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bt-card-type {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: #cc44ff;
  margin-top: 3px;
}

.bt-card-obj-desc {
  font-family: 'VT323', monospace;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

/* ===== INSTRUCTION ===== */
.bt-instruction {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #00cc33;
  text-align: center;
  padding: 2px 0;
  min-height: 20px;
  transition: color 0.3s;
}

.bt-instruction.instruction-flash {
  color: #ff4444;
}

/* ===== LOG DE COMBAT ===== */
.bt-log {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  max-height: 55px;
  overflow-y: auto;
  text-align: left;
  border: 1px solid rgba(0, 77, 21, 0.3);
  border-radius: 4px;
  padding: 4px 8px;
  background: rgba(0, 5, 0, 0.3);
  font-size: 12px;
  opacity: 0.5;
  transition: opacity 0.3s, max-height 0.3s;
}

.bt-log:hover {
  opacity: 1;
  max-height: 120px;
}

.bt-log::-webkit-scrollbar { width: 3px; }
.bt-log::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 2px; }

.bt-log .battle-log-entry {
  padding: 1px 0;
  border-bottom: 1px solid rgba(0, 255, 65, 0.05);
  font-family: 'VT323', monospace;
}

/* Log entry colors (conserves) */
.log-player-attack { color: #44ff44; }
.log-enemy-attack { color: #ff6644; }
.log-ability { color: #cc44ff; }
.log-ko { color: #ff4444; font-weight: bold; }
.log-revive { color: #ffaa00; }
.log-stun { color: #ffcc00; }
.log-heal { color: #44ff44; }
.log-poison { color: #aa44ff; }
.log-mark { color: #ffaa00; }
.log-passive { color: #6699cc; font-style: italic; }
.log-sacrifice { color: #cc3333; }
.log-shield { color: #44cccc; }
.log-deploy { color: #44ccff; }
.log-enemy-deploy { color: #ff8844; }
.log-draw { color: #888; }
.log-normal { color: #aaa; }

/* ===== BATTLE ANIMATIONS ===== */

/* Damage float */
.damage-float {
  position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace; font-size: 18px;
  color: #ff4444; text-shadow: 0 0 12px rgba(255,68,68,0.9);
  z-index: 20; pointer-events: none;
  animation: damageFloatUp 1.2s ease-out forwards;
}
@keyframes damageFloatUp {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.4); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-45px) scale(1); }
}

/* Heal float */
.heal-float {
  position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace; font-size: 16px;
  color: #44ff44; text-shadow: 0 0 10px rgba(68,255,68,0.8);
  z-index: 20; pointer-events: none;
  animation: healFloatUp 1.2s ease-out forwards;
}
@keyframes healFloatUp {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.3); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(1); }
}

/* Status icon float */
.status-float {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  font-size: 24px; z-index: 20; pointer-events: none;
  animation: statusFloatUp 1.2s ease-out forwards;
}
@keyframes statusFloatUp {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.5); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-35px) scale(1); }
}

/* Impact shake */
.impact-shake { animation: impactShake 0.3s ease-out; }
@keyframes impactShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  60% { transform: translate(-3px, 1px); }
  80% { transform: translate(2px, -1px); }
  100% { transform: translate(0, 0); }
}

/* Impact flash */
.impact-flash {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.5); border-radius: 6px;
  pointer-events: none; animation: impactFlashFade 0.4s ease-out forwards; z-index: 10;
}
@keyframes impactFlashFade { 0% { opacity: 1; } 100% { opacity: 0; } }

/* Ability casting glow */
.ability-casting { animation: abilityCastPulse 0.8s ease-in-out; }
@keyframes abilityCastPulse {
  0% { filter: brightness(1); } 30% { filter: brightness(1.7); } 100% { filter: brightness(1); }
}

/* Ability hit flash */
.ability-hit-flash {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 6px; pointer-events: none; opacity: 0.5;
  animation: abilityHitFade 0.6s ease-out forwards; z-index: 10;
}
@keyframes abilityHitFade {
  0% { opacity: 0.5; transform: scale(1.04); } 100% { opacity: 0; transform: scale(1); }
}

/* Deploy slam */
.deploy-anim { animation: deploySlamIn 0.5s ease-out; }
@keyframes deploySlamIn {
  0% { transform: translateY(-35px) scale(0.6); opacity: 0; }
  60% { transform: translateY(3px) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* KO animation */
.ko-anim { animation: koFadeOut 0.5s ease-in forwards; }
@keyframes koFadeOut {
  0% { transform: scale(1); opacity: 1; filter: none; }
  50% { transform: scale(0.95); filter: grayscale(1) brightness(0.5); }
  100% { transform: scale(0.9); opacity: 0.3; filter: grayscale(1) brightness(0.3); }
}

/* Animation overlay */
.battle-anim-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 30;
}

/* Battle result overlay */
.battle-result-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 2000;
  display: flex; justify-content: center; align-items: center;
}
.battle-result-overlay.hidden { display: none; }

.battle-result-box {
  text-align: center; padding: 40px;
  border: 3px solid; border-radius: 12px;
  background: rgba(0, 10, 0, 0.9);
  animation: modalSlideIn 0.5s ease-out;
}
.battle-result-box h1 {
  font-family: 'Press Start 2P', monospace; font-size: 28px; margin-bottom: 20px;
}
.result-victory { border-color: #22cc44; }
.result-victory h1 { text-shadow: 0 0 30px rgba(34,204,68,0.6); }
.result-defeat { border-color: #cc2222; }
.result-defeat h1 { text-shadow: 0 0 30px rgba(204,34,34,0.6); }
#result-rewards { font-size: 22px; color: #ffaa00; margin-bottom: 20px; }

/* Screen flash */
.screen-flash {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3000;
}
.flash-active { animation: flashAnim 0.4s ease-out forwards; }
@keyframes flashAnim { 0% { background: rgba(255,255,255,0.5); } 100% { background: transparent; } }

/* ===== BATTLE RESPONSIVE ===== */
@media (max-width: 1000px) {
  .bt-actions {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 20;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  }
  .bt-slot { width: 180px; min-height: 170px; }
  .bt-slot-empty { min-height: 170px; }
}

@media (max-width: 700px) {
  .bt-slot { width: 155px; min-height: 150px; }
  .bt-slot-empty { min-height: 150px; }
  .bt-unit-emoji { font-size: 32px; }
  .bt-unit-name { font-size: 7px; }
  .bt-unit-stats { font-size: 15px; gap: 8px; }
  .bt-unit-ability .bt-ability-desc { display: none; }
  .bt-card { width: 90px; padding: 5px; }
  .bt-card-emoji { font-size: 26px; }
  .bt-card-name { font-size: 5px; }
  .bt-card-ability { display: none; }
  .bt-topbar { flex-wrap: wrap; height: auto; padding: 4px 8px; gap: 4px; }
  .bt-turn { font-size: 10px; }
  .bt-topbar-center { position: static; transform: none; }
  .bt-end-turn { font-size: 8px; padding: 6px 10px; }
  .bt-field { gap: 8px; }
  .bt-actions { width: 180px; min-width: 180px; }
}

/* ==============================
   PVP PAGE
   ============================== */

.pvp-wrapper {
  text-align: center; width: 800px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
}

.pvp-section {
  border: 1px solid #004d15; border-radius: 8px;
  padding: 20px; margin: 16px 0;
  background: rgba(0, 10, 0, 0.4);
}

.pvp-section-title {
  font-family: 'Press Start 2P', monospace; font-size: 12px;
  color: #00cc33; margin-bottom: 12px;
}

.pvp-defense-team {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 12px;
}

.pvp-no-team { color: #444; font-size: 18px; }

.pvp-defense-card {
  width: 100px; background: rgba(0, 8, 0, 0.9);
  border: 2px solid; border-radius: 6px;
  padding: 6px; text-align: center;
}
.pvp-defense-img { width: 100%; height: 60px; object-fit: cover; border-radius: 4px; }
.pvp-defense-name { font-family: 'Press Start 2P', monospace; font-size: 7px; color: #00ff41; margin: 4px 0; }
.pvp-defense-stats { font-family: 'Press Start 2P', monospace; font-size: 7px; }

.pvp-edit-btn { max-width: 200px; margin: 0 auto; }
.pvp-find-btn { max-width: 300px; margin: 0 auto; }
.pvp-attack-btn { max-width: 200px; margin: 16px auto 0; }

.pvp-opponent { margin-top: 20px; }
.pvp-opponent h3 {
  font-family: 'Press Start 2P', monospace; font-size: 12px;
  color: #ff6644; margin-bottom: 10px;
}

.pvp-opponent-team {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 16px;
}

/* Editor overlay */
.pvp-editor-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9); z-index: 2000;
  display: flex; justify-content: center; align-items: center;
}
.pvp-editor-overlay.hidden { display: none; }

.pvp-editor {
  background: rgba(0, 15, 0, 0.95); border: 2px solid #00ff41;
  border-radius: 10px; padding: 24px; width: 600px; max-width: 90vw;
  max-height: 80vh; overflow-y: auto;
}
.pvp-editor h2 {
  font-family: 'Press Start 2P', monospace; font-size: 12px;
  color: #00ff41; margin-bottom: 16px;
}
.pvp-editor-actions {
  display: flex; gap: 10px; justify-content: center; margin-top: 16px;
}
.pvp-editor-actions .submit-btn { width: auto; padding: 10px 20px; }

/* ==============================
   ADMIN PANEL
   ============================== */

.admin-wrapper {
  text-align: center; width: 1000px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
}

.admin-wrapper::-webkit-scrollbar { width: 6px; }
.admin-wrapper::-webkit-scrollbar-track { background: #001a00; }
.admin-wrapper::-webkit-scrollbar-thumb { background: #ff4444; border-radius: 3px; }

.admin-section {
  border: 1px solid #440000; border-radius: 8px;
  padding: 16px; margin: 16px 0;
  background: rgba(40, 0, 0, 0.3);
}

.admin-section-title {
  font-family: 'Press Start 2P', monospace; font-size: 12px;
  color: #ff6644; margin-bottom: 12px;
}

.admin-stats {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

.stat-box {
  border: 1px solid #ff4444; border-radius: 6px;
  padding: 12px 20px; background: rgba(40, 0, 0, 0.4);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 100px;
}

.stat-num {
  font-family: 'Press Start 2P', monospace; font-size: 18px;
  color: #ff4444; text-shadow: 0 0 10px rgba(255,68,68,0.5);
}
.stat-label { font-size: 14px; color: #993333; }

/* Admin tabs */
.admin-tabs {
  display: flex; gap: 4px; margin: 16px 0 0;
  border-bottom: 2px solid #440000;
}

.admin-tab {
  padding: 10px 20px; background: none; border: none;
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  color: #663333; cursor: pointer; transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.admin-tab:hover { color: #ff6644; }
.admin-tab.active {
  color: #ff4444; border-bottom-color: #ff4444;
  text-shadow: 0 0 10px rgba(255,68,68,0.4);
}

/* Admin panels */
.admin-panel {
  border: 1px solid #330000; border-radius: 0 0 8px 8px;
  padding: 16px; background: rgba(20, 0, 0, 0.4);
  text-align: left;
}

/* Admin table */
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  color: #ff6644; padding: 8px 6px; border-bottom: 1px solid #440000;
  text-align: left;
}
.admin-table td {
  padding: 6px; border-bottom: 1px solid rgba(68,0,0,0.3);
  color: #00cc33;
}
.admin-table tr:hover td { background: rgba(255,68,68,0.05); }

.admin-badge {
  font-family: 'Press Start 2P', monospace; font-size: 6px;
  color: #000; background: #ff4444; padding: 1px 4px; border-radius: 2px;
  margin-left: 4px;
}

.admin-action-btn {
  padding: 3px 8px; background: rgba(255,68,68,0.1);
  border: 1px solid #ff4444; color: #ff4444;
  font-family: 'VT323', monospace; font-size: 14px;
  cursor: pointer; border-radius: 3px; transition: all 0.2s;
}
.admin-action-btn:hover {
  background: rgba(255,68,68,0.3);
  box-shadow: 0 0 8px rgba(255,68,68,0.3);
}

/* Admin forms */
.admin-form h3 {
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  color: #ff6644; margin: 16px 0 8px;
}
.admin-form h3:first-child { margin-top: 0; }

.admin-form-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 8px;
}

.admin-form-row label {
  font-size: 16px; color: #993333; white-space: nowrap;
}

.admin-form-row input[type="number"],
.admin-form-row input[type="text"] {
  padding: 6px 10px; background: rgba(40, 0, 0, 0.5);
  border: 1px solid #ff4444; border-radius: 3px;
  color: #ff6644; font-family: 'VT323', monospace; font-size: 18px;
  outline: none; width: 100px;
}
.admin-form-row input[type="text"] { width: 180px; }
.admin-form-row input:focus { box-shadow: 0 0 8px rgba(255,68,68,0.3); }

.admin-form-row select {
  padding: 6px 10px; background: rgba(40, 0, 0, 0.8);
  border: 1px solid #ff4444; border-radius: 3px;
  color: #ff6644; font-family: 'VT323', monospace; font-size: 18px;
  outline: none;
}

.admin-form-row input[type="checkbox"] {
  accent-color: #ff4444;
}

.admin-small-btn {
  width: auto !important; padding: 6px 14px !important;
  font-size: 10px !important;
}

.admin-form-grid {
  display: flex; flex-direction: column; gap: 8px;
}

/* Feedback */
.admin-feedback {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace; font-size: 10px;
  padding: 12px 24px; border-radius: 6px; z-index: 3000;
  animation: feedbackSlide 0.3s ease-out;
}
.admin-feedback.hidden { display: none; }

.feedback-success {
  color: #22cc44; border: 2px solid #22cc44;
  background: rgba(0, 40, 0, 0.9);
  box-shadow: 0 0 20px rgba(34,204,68,0.3);
}
.feedback-error {
  color: #ff4444; border: 2px solid #ff4444;
  background: rgba(40, 0, 0, 0.9);
  box-shadow: 0 0 20px rgba(255,68,68,0.3);
}

@keyframes feedbackSlide {
  0% { transform: translateX(-50%) translateY(20px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ==============================
   WIKI PAGE
   ============================== */

.wiki-wrapper {
  width: 850px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: #00ff41 #0a0a0a;
}
.wiki-wrapper::-webkit-scrollbar { width: 6px; }
.wiki-wrapper::-webkit-scrollbar-track { background: #0a0a0a; }
.wiki-wrapper::-webkit-scrollbar-thumb { background: #00ff41; border-radius: 3px; }
.wiki-wrapper .menu-title { text-align: center; margin-bottom: 20px; }

.wiki-search { margin-bottom: 20px; text-align: center; }
.wiki-search-input {
  background: rgba(0, 10, 0, 0.8);
  border: 2px solid #004d15;
  border-radius: 6px;
  color: #00ff41;
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 8px 16px;
  width: 100%; max-width: 400px;
  outline: none;
  transition: border-color 0.2s;
}
.wiki-search-input:focus {
  border-color: #00ff41;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}
.wiki-search-input::placeholder { color: #444; }

.wiki-sections { display: flex; flex-direction: column; gap: 12px; }

.wiki-section {
  border: 1px solid #004d15;
  border-radius: 8px;
  background: rgba(0, 10, 0, 0.4);
  overflow: hidden;
}
.wiki-section[open] { border-color: #00cc33; }

.wiki-section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #00ff41;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  transition: all 0.2s;
  user-select: none;
}
.wiki-section-title::-webkit-details-marker { display: none; }
.wiki-section-title::before { content: '> '; color: #00cc33; }
.wiki-section[open] > .wiki-section-title::before { content: 'v '; }
.wiki-section-title:hover {
  background: rgba(0, 255, 65, 0.05);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

.wiki-section-content {
  padding: 16px;
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: #ccc;
  border-top: 1px dashed #003300;
  line-height: 1.6;
}
.wiki-section-content p { margin: 8px 0; }
.wiki-section-content ul, .wiki-section-content ol {
  margin: 8px 0; padding-left: 24px;
}
.wiki-section-content li { margin: 4px 0; }

.wiki-subtitle {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #00cc33;
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #003300;
}

/* Wiki tables */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-family: 'VT323', monospace;
  font-size: 16px;
}
.wiki-table th {
  background: rgba(0, 255, 65, 0.1);
  color: #00ff41;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 8px;
  text-align: left;
  border-bottom: 2px solid #004d15;
}
.wiki-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.08);
  color: #aaa;
}
.wiki-table tr:hover td { background: rgba(0, 255, 65, 0.03); color: #ddd; }

/* Wiki highlights */
.wiki-highlight { color: #00ff41; }
.wiki-action-deploy { color: #00ff41; font-weight: bold; }
.wiki-action-attack { color: #ff6644; font-weight: bold; }
.wiki-action-ability { color: #cc44ff; font-weight: bold; }
.wiki-action-item { color: #ffcc00; font-weight: bold; }

.wiki-type-guerrier { color: #ff6644; }
.wiki-type-mage { color: #cc44ff; }
.wiki-type-bete { color: #44aa33; }
.wiki-type-divin { color: #ffcc00; }

.wiki-elem-feu { color: #ff4422; }
.wiki-elem-eau { color: #2299ff; }
.wiki-elem-terre { color: #44aa33; }
.wiki-elem-lumiere { color: #ffcc00; }
.wiki-elem-ombre { color: #9944cc; }

.wiki-formula {
  background: rgba(0, 255, 65, 0.06);
  border: 1px solid #003300;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 10px 0;
  font-family: 'VT323', monospace;
  font-size: 19px;
  color: #ffcc00;
  text-align: center;
}

.wiki-element-triangle { text-align: center; margin: 16px 0; }
.wiki-element-row {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wiki-arrow { color: #666; font-size: 14px; }

/* Nav wiki button */
.nav-wiki { border-color: #2299ff; }

/* Wiki in combat hub */
.combat-mode-wiki { border-color: #2299ff; color: #44aaff; }
.combat-mode-wiki:hover {
  box-shadow: 0 0 25px rgba(34,153,255,0.3);
  background: rgba(0, 10, 40, 0.8);
}

@media (max-width: 700px) {
  .wiki-wrapper { padding: 12px; }
  .wiki-section-title { font-size: 9px; padding: 10px 12px; }
  .wiki-section-content { font-size: 15px; padding: 12px; }
  .wiki-table { font-size: 14px; }
  .wiki-table th { font-size: 7px; padding: 6px; }
  .wiki-table td { padding: 4px 6px; }
  .wiki-formula { font-size: 16px; }
  .wiki-element-row { font-size: 8px; }
}
