/**
  Space Invectors - A "Space Invaders-like" game written in JavaScript, HTML & CSS, with SVG icons.
  Copyright (C) 2022-2025 Camelia Lavender <cam at camelia.dev>

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as published
  by the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Affero General Public License for more details.

  You should have received a copy of the GNU Affero General Public License
  along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

:root {
  --fonts: "Source Code Pro", "Fira Code", monospace;
  --text-color: #ffffff;
  --bg-color-black: #0c0c0c;
  --bg-color-purple: #16121b;
  --bg-color-red: #1b1212;
  --bg-color-blue: #12151b;
  --bg-color-green: #121b18;

  --bg-color: var(--bg-color-black);
  --bg-color-black-transparent: #070707;

  --red: #521717;
}

::selection,
::-moz-selection {
  background-color: #ffffffcb;
  color: var(--bg-color);
}

html {
  height: 100%;
  position: relative;
}
body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--fonts);
  height: 100%;
  position: relative;
}
section {
  position: relative;
  display: none;
  padding: 2rem 0.6rem 0 0.6rem;
}
section.active {
  display: inherit;
}
code {
  background-color: var(--text-color);
  color: var(--bg-color);
  font-family: var(--fonts);
  font-size: 100%;
  padding: 1px 5px;
}
.box {
  text-align: center;
  max-width: 40rem;
  margin: 0.5rem auto;
  padding: 2rem 2rem;
  border: var(--text-color) 8px double;
  background-color: var(--bg-color-black-transparent);
}
.box--icon {
  width: 6rem;
  height: 6rem;
}
.box--title {
  max-width: 20rem;
  margin: 1rem auto 1.8rem auto;
  border-bottom: var(--text-color) 6px double;
  padding-bottom: 0.8rem;
}
.box--buttons {
  user-select: none;
}
.box--buttons button {
  margin-top: 0.5rem;
  text-transform: uppercase;
  border: var(--text-color) 5px double;
  background: none;
  font-family: var(--fonts);
  color: var(--text-color);
  font-size: 1.1rem;
  padding: 0.3rem 1.2rem;
  cursor: pointer;
  transition-duration: 200ms;
  font-weight: 500;
  min-width: 7.5rem;
}
.box--buttons button:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
  border-color: var(--bg-color);
}
.error--nojs {
  background-color: var(--red);
  text-align: center;
  max-width: 40rem;
  margin: 0.5rem auto;
  padding: 0.1rem 2rem;
  border: var(--red) 8px solid;
}
.box ul {
  padding-left: 0px;
}
.box li::marker {
  content: "";
}
.box li {
  margin: 8px 0;
}

/* for arena */

#game-arena {
  padding-top: 0px;
  grid-template-columns: 1050px auto;
  display: hidden;
}
#game-arena.active {
  display: grid;
}
#arena--table {
  position: relative;
  width: 1010px;
  height: 810px;
  box-sizing: content-box;
  padding: 5px;
  border: 5px double var(--text-color);
  background-color: var(--bg-color-blue);
  margin-right: 0px;
  user-select: none;
}
#arena--table.red {
  background-color: var(--bg-color-red);
}
.arena tr {
  height: 50px;
}
.arena td {
  width: 50px;
  height: 50px;
  position: relative;
}

.arena td img {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 0;
  left: 0;
}
.arena td img.player {
  z-index: 10;
}
.arena td img.player-shot {
  z-index: 9;
}
.arena--player {
  margin: 2rem auto 10rem auto;
  width: fit-content;
  height: fit-content;
  border: var(--text-color) 8px double;
  background-color: var(--bg-color-black-transparent);
}
ul.arena--player-info {
  padding-left: 1rem;
  text-align: left;
}
.arena--player-info li {
  margin: 5px 0;
  display: flex;
  align-items: center;
  font-size: 1.5rem;
}
.arena--player-info li .value {
  margin-left: 20px;
}
.arena--player-info li::marker {
  content: "";
}
.arena--player-info svg {
  width: 15px;
}
.arena--player-info svg path {
  fill: var(--text-color);
}
