/* Fight animation overlay */
#fight-overlay {
  animation: fadeIn 0.3s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Modern board colors */
:root{
  --light:#f6ecd9;      /* elegant ivory */
  --dark:#181818;       /* deep black */
  --accent:#4682b4;     /* elegant blue accent */
  --piece-shadow:0 4px 16px 0 rgba(40,40,40,0.18);
}
*{box-sizing:border-box}
body{font-family:system-ui,Segoe UI,Roboto,Arial;margin:16px;background:#fafafa;color:#222}
h1{font-size:18px;margin:0 0 12px}
h1{font-size:18px;margin:0 0 12px}
/* Board is a perfect square, grid 8x8 */
#board{
  width:min(640px,92vw);
  aspect-ratio:1;
  display:grid;
  grid-template-columns:repeat(8,1fr);
  grid-template-rows:repeat(8,1fr);
  border:6px solid var(--accent);
  box-shadow:0 12px 48px 0 rgba(70,130,180,0.18), 0 0 0 8px #f6ecd9 inset;
  border-radius:24px;
  overflow:hidden;
}
.square{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:clamp(28px,6vw,48px);
  user-select:none;
  cursor:pointer;
  aspect-ratio:1;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  transition:background 0.2s, box-shadow 0.2s;
  box-shadow:inset 0 0 12px 0 rgba(0,0,0,0.08);
}
.light{
  background:radial-gradient(ellipse at 60% 40%, #fff 60%, var(--light) 100%);
}
.dark{
  background:radial-gradient(ellipse at 40% 60%, #444 60%, var(--dark) 100%);
}
.selected{
  outline:4px solid var(--accent);
  z-index:2;
}
.square > span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-weight: 900;
  font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', 'DejaVu Sans', system-ui, sans-serif;
  border-radius: 50%;
  font-size: clamp(36px, 7vw, 56px);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-shadow: 0 2px 12px 0 rgba(40,40,40,0.10);
  background: rgba(255,255,255,0.01);
}
.piece-white {
  color: #e2b560;
  background: linear-gradient(145deg, #fffbe6 60%, #f6ecd9 100%);
  text-shadow: 0 2px 12px #fffbe6, 0 1px 0 #fff, 0 0 8px #e2b560;
  filter: brightness(1.08) drop-shadow(0 2px 8px #fffbe6);
}
.piece-black {
  color: #222;
  background: linear-gradient(145deg, #444 60%, #181818 100%);
  text-shadow: 0 2px 12px #444, 0 1px 0 #fff, 0 0 8px #181818;
  filter: brightness(1.12) drop-shadow(0 2px 8px #444);
}
