/* shared.css — Reusable component classes */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-pixel);
  background-color: var(--c-bg);
  /* Subtle brass-tinted grid — gives a panel/arcade-cabinet floor feel */
  background-image:
    linear-gradient(rgba(212, 160, 23, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 160, 23, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* ══════════════════════════════════════════════
   Logo
   ══════════════════════════════════════════════ */
.logo-text {
  font-family: var(--font-pixel);
  font-size: 2.8rem;
  letter-spacing: 0.14em;
  line-height: 1;
  color: #fff;
  animation: logoGlow 3s ease-in-out infinite alternate;
}

.logo-sub {
  font-family: var(--font-pixel);
  font-size: 0.60rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-brass);
  opacity: 0.80;
  text-align: center;
}

/* ══════════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════════ */
.btn-pink {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--c-pink) 0%, var(--c-pink-mid) 100%);
  border: none;
  padding: 13px 24px;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
  /* pixel-chamfered corners */
  clip-path: polygon(
    5px 0%, calc(100% - 5px) 0%,
    100% 5px, 100% calc(100% - 5px),
    calc(100% - 5px) 100%, 5px 100%,
    0% calc(100% - 5px), 0% 5px
  );
  box-shadow: 0 5px 0 var(--c-pink-deep), var(--glow-pink-sm);
  transition: box-shadow 0.15s, transform 0.08s;
}
.btn-pink:hover  { box-shadow: 0 5px 0 var(--c-pink-deep), var(--glow-pink); }
.btn-pink:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--c-pink-deep), var(--glow-pink-sm); }

.btn-ghost {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--c-text-dim);
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
  text-decoration-style: dotted;
  padding: 0;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--c-pink); }

.btn-secondary {
  font-family: var(--font-pixel);
  font-size: 0.60rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-brass);
  background: linear-gradient(180deg, rgba(30,30,34,0.98) 0%, rgba(18,18,20,0.98) 100%);
  border: 1px solid var(--c-brass-deep);
  padding: 9px 14px;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
  clip-path: polygon(
    4px 0%, calc(100% - 4px) 0%,
    100% 4px, 100% calc(100% - 4px),
    calc(100% - 4px) 100%, 4px 100%,
    0% calc(100% - 4px), 0% 4px
  );
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 214, 102, 0.04) inset;
  transition: transform 0.08s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-secondary:hover {
  color: #fff;
  border-color: var(--c-brass);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 0 12px rgba(255, 214, 102, 0.12);
}
.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 10px rgba(255, 214, 102, 0.10);
}

/* ══════════════════════════════════════════════
   Input
   ══════════════════════════════════════════════ */
.input-chrome {
  font-family: var(--font-pixel);
  font-size: 0.70rem;
  letter-spacing: 0.08em;
  color: var(--c-text);
  background: var(--c-bg);
  border: 2px solid var(--c-chrome-deep);
  padding: 11px 13px;
  width: 100%;
  outline: none;
  clip-path: polygon(
    4px 0%, calc(100% - 4px) 0%,
    100% 4px, 100% calc(100% - 4px),
    calc(100% - 4px) 100%, 4px 100%,
    0% calc(100% - 4px), 0% 4px
  );
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-chrome::placeholder { color: var(--c-text-muted); }
.input-chrome:focus {
  border-color: var(--c-brass);
  box-shadow: var(--glow-brass-sm);
}

/* ══════════════════════════════════════════════
   Typography
   ══════════════════════════════════════════════ */
.section-head {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c-brass);
}

.px-label {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-brass);
}

.username-display {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--c-chrome-mid);
  text-shadow: 0 0 10px rgba(192, 192, 192, 0.40);
}

.error-msg {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--c-pink);
  min-height: 1.4em;
}

.help-text {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  line-height: 2;
  color: var(--c-text-muted);
  text-align: center;
}

/* ── W / L stat display ── */
.stat-win  { font-family: var(--font-pixel); font-size: 0.65rem; letter-spacing: 0.08em; color: #4ade80; }
.stat-sep  { font-family: var(--font-pixel); font-size: 0.65rem; color: var(--c-chrome-deep); }
.stat-loss { font-family: var(--font-pixel); font-size: 0.65rem; letter-spacing: 0.08em; color: var(--c-pink); }


/* ----------------------------------------------
   Move chip � unified pixel-art move display
   Used in: game.html (selection), battle.html (clash + result)
   Contains: dark chamfered card + 60�60 sprite + uppercase move name
   States: .selected (pink), .dimmed, .hidden-label (sprite-only)
   ---------------------------------------------- */
.move-chip {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-chrome-mid);
  background: #141414;
  width: 108px;
  flex-shrink: 0;
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  clip-path: polygon(
    6px 0%, calc(100% - 6px) 0%,
    100% 6px, 100% calc(100% - 6px),
    calc(100% - 6px) 100%, 6px 100%,
    0% calc(100% - 6px), 0% 6px
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 0 1px var(--c-chrome-deep);
  position: relative;
}

.move-chip-icon {
  width: 72px;
  height: 72px;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

.move-chip-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 3px;
}

.move-chip-label {
  display: block;
  line-height: 1;
}

/* Sprite-only mode: keep label space reserved so layout doesn't shift */
.move-chip.hidden-label .move-chip-label {
  visibility: hidden;
}

/* Dimmed (another move was chosen) */
.move-chip.dimmed {
  opacity: 0.25;
  box-shadow: none;
}
