/* =============================================
   SYS://CARD v0.3 — Global Styles
   Fonts: Orbitron (display) + Share Tech Mono (body)
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #03030a;
  --bg2:      #07071a;
  --bg3:      #0c0c22;
  --green:    #00ff88;
  --green2:   #00cc66;
  --blue:     #00cfff;
  --purple:   #bf44ff;
  --red:      #ff2255;
  --gold:     #ffbb00;
  --cyan:     #00ffee;
  --text:     #c8d8e8;
  --muted:    #445566;
  --border:   #0f1f2f;
  --font-d:   'Orbitron', monospace;
  --font-b:   'Share Tech Mono', monospace;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: var(--font-b); overflow: hidden;
}

#root { width: 100vw; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* ── Splash screen (avant que React charge) ── */
#splash {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100vw; height: 100vh;
  background: var(--bg);
}
.splash-logo {
  font-family: 'Orbitron', monospace;
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 900; color: #00ff88;
  letter-spacing: 6px;
  text-shadow: 0 0 30px #00ff8855;
  animation: glitch 4s infinite;
}
.splash-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px; color: #334455;
  letter-spacing: 4px; margin-top: 12px;
  animation: blink 1.2s infinite;
}

/* ── Scrollbars ── */
::-webkit-scrollbar       { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1a2a3a; border-radius: 2px; }

/* ── CRT effects ── */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.06) 3px, rgba(0,0,0,0.06) 4px
  );
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9997;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
}

/* ── Animations ── */
@keyframes glitch {
  0%,90%,100% { text-shadow: 2px 0 var(--red), -2px 0 var(--blue); transform: none; }
  92%         { text-shadow: -3px 0 var(--red), 3px 0 var(--blue); transform: translateX(-2px); }
  94%         { text-shadow: 3px 0 var(--purple), -3px 0 var(--cyan); transform: translateX(2px); }
  96%         { text-shadow: -2px 0 var(--red), 2px 0 var(--blue); transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes cardReveal {
  0%   { transform: rotateY(90deg) scale(0.8); opacity: 0; }
  60%  { transform: rotateY(-6deg) scale(1.04); opacity: 1; }
  100% { transform: rotateY(0deg)  scale(1);    opacity: 1; }
}
@keyframes shimmer {
  0%,100% { background-position: 200% center; }
  50%     { background-position: -200% center; }
}
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 4px currentColor; }
  50%     { box-shadow: 0 0 16px currentColor, 0 0 32px currentColor; }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-7px); }
}
@keyframes blink {
  0%,100% { opacity: 1; } 50% { opacity: 0; }
}
@keyframes hit {
  0%,100% { transform: translateX(0) scale(1); filter: brightness(1); }
  25%     { transform: translateX(-5px) scale(0.97); filter: brightness(2) saturate(4); }
  50%     { transform: translateX(5px) scale(0.97); }
  75%     { transform: translateX(-2px); }
}
@keyframes matrixRain {
  0%   { transform: translateY(-100%); opacity: 0.7; }
  100% { transform: translateY(100vh); opacity: 0; }
}
@keyframes notifIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(0.93); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)      scale(1);    }
}
@keyframes scanBoot {
  from { clip-path: inset(0 0 100% 0); opacity: 0; }
  to   { clip-path: inset(0 0 0% 0);   opacity: 1; }
}

/* ── Utility ── */
.font-d  { font-family: var(--font-d); }
.font-b  { font-family: var(--font-b); }

.panel {
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 14px;
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-d); font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
  background: transparent; border: 1px solid currentColor;
  padding: 9px 22px; border-radius: 4px;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: currentColor; opacity: 0; transition: opacity 0.15s;
}
.btn:hover::after  { opacity: 0.08; }
.btn:hover         { box-shadow: 0 0 12px currentColor44; }
.btn:active        { transform: scale(0.96); }
.btn:disabled      { opacity: 0.3; cursor: not-allowed; }
.btn-sm            { padding: 5px 14px; font-size: 9px; }
.btn-full          { width: 100%; }

/* ── Inputs ── */
.input {
  background: #050510; border: 1px solid #1a2a3a; color: var(--text);
  padding: 8px 12px; border-radius: 4px;
  font-family: var(--font-b); font-size: 11px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(0,255,136,0.1);
}
select.input { cursor: pointer; }
input[type="number"].input { -moz-appearance: textfield; }
input[type="number"].input::-webkit-inner-spin-button { display: none; }

/* ── Screen header ── */
.screen-hdr {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; flex-shrink: 0; gap: 12px;
  background: rgba(3,3,10,0.97);
  border-bottom: 1px solid rgba(0,255,136,0.08);
  backdrop-filter: blur(10px);
}
.screen-title {
  font-family: var(--font-d); font-size: 13px; letter-spacing: 3px;
  white-space: nowrap;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex; gap: 8px; padding: 8px 16px;
  flex-shrink: 0; flex-wrap: wrap;
  background: rgba(3,3,10,0.7);
  border-bottom: 1px solid var(--border);
}

/* ── Card grid ── */
.card-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-content: flex-start; padding: 12px 16px;
}

/* ── HP / Energy bars ── */
.bar-track {
  height: 6px; background: #050510;
  border-radius: 3px; overflow: hidden;
}
.bar-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.45s ease;
}

/* ── Energy pip ── */
.energy-pip {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid currentColor;
  transition: background 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

/* ── Status badge ── */
.status-badge {
  font-family: var(--font-d); font-size: 7px; letter-spacing: 1px;
  padding: 2px 6px; border-radius: 3px; border: 1px solid currentColor;
  text-transform: uppercase; animation: pulse-glow 2s infinite;
  white-space: nowrap;
}

/* ── Notification ── */
.notif {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  padding: 9px 22px; border-radius: 5px;
  font-family: var(--font-d); font-size: 10px; letter-spacing: 2px;
  z-index: 3000; white-space: nowrap; pointer-events: none;
  animation: notifIn 0.3s ease;
  background: rgba(3,3,10,0.97);
}

/* ── Login box ── */
.login-bg {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center; z-index: 500;
}
.login-box {
  width: min(420px, 92vw); padding: 40px 36px;
  background: rgba(7,7,26,0.98);
  border: 1px solid rgba(0,255,136,0.18);
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,255,136,0.06), inset 0 0 40px rgba(0,0,0,0.5);
  animation: fadeUp 0.4s ease;
}

/* ── Matrix rain ── */
.matrix-col {
  position: absolute; top: 0;
  font-family: var(--font-b); font-size: 12px;
  color: rgba(0,255,136,0.12);
  user-select: none; pointer-events: none;
  animation: matrixRain linear infinite;
  white-space: pre; line-height: 1.4;
}

/* ── Battle field ── */
.battle-field {
  display: flex; flex-direction: column; flex: 1; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,80,40,0.1), transparent 55%);
}

/* ── Pack slot ── */
.pack-slot {
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.pack-slot:hover { transform: translateY(-4px); }

/* ── Legendary shimmer text ── */
.text-legendary {
  background: linear-gradient(90deg, #ffbb00, #ff8800, #ffee00, #ffbb00);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 2.5s linear infinite;
}

/* ── Error banner ── */
.error-banner {
  padding: 7px 16px; font-family: var(--font-d); font-size: 10px;
  letter-spacing: 1px; flex-shrink: 0;
  background: rgba(255,34,85,0.08);
  border-bottom: 1px solid rgba(255,34,85,0.2);
  color: var(--red); display: flex; align-items: center; gap: 10px;
}

/* ── Tab buttons ── */
.tab-btn {
  padding: 8px 18px; background: transparent; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  font-family: var(--font-d); font-size: 9px; letter-spacing: 2px;
  transition: all 0.2s;
}
.tab-btn.active {
  border-bottom-color: currentColor;
  background: rgba(255,255,255,0.04);
}

/* ── Responsive tweaks ── */
@media (max-width: 480px) {
  .login-box { padding: 28px 20px; }
  .screen-hdr { padding: 8px 12px; }
  .card-grid { gap: 7px; padding: 8px 10px; }
}
