

@font-face {
  font-family: "Arcadepix Plus";
  src: url("../images/ArcadepixPlus.woff2") format("woff2");
  font-display: block;
}

:root {
  --textcolor: #fffeec;
  --squarecolor: #383838;
  --hilight: #25fff4;
  --red: #d30000;


}

.faction-name{
  color: var(--textcolor);
  text-shadow:none;
  font-size:2rem;
}

.gameboard {
  display: flex;
  justify-content: center;
  align-items: center;
  display: none;
   flex-direction: column;
  
}

body {
  font-family: "Arcadepix Plus", serif;
  background:
   linear-gradient(#141414f5, #141414f5) fixed,
    url("../images/bg8bit.gif") repeat fixed,
    #141414;

    color: var(--textcolor)
}

p {

  font-family: "Arcadepix Plus", "serif";
  color: var(--textcolor);
}

#startgame, #restart, #nextlevel, #startgamefirst {
width: 7em;
height: 3em;
justify-content: center;
align-items: center;
font-size: 2rem;
border-width: 0;
background: #00000050;  
color:var(--textcolor);
border: 2px solid var(--hilight);
}

#startgame:hover, #restart:hover, #nextlevel:hover, #startgamefirst:hover {
background: #000000;  
  transform: scale(1.03);
  border: 2px solid var(--hilight);
  color: var(--hilight);
}

h2, .faction-name{
font-family:"Arcadepix Plus", serif;
text-align: center; 
font-size: 42px; 
letter-spacing: 0.1em;
color: var(--textcolor);
 text-shadow: none;
}

.board {
  display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
grid-template-rows: repeat(5, minmax(0, 1fr));
   width: min(90vw, 70vh);
  aspect-ratio: 1;          /* keeps it square at any size */
   border: solid 2px var(--squarecolor);
  
}

.square img {
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  object-fit: contain;   /* scales without stretching or cropping */
  display: block;
}

header {
  position: fixed;          /* takes it out of the layout, so no blank gap is left behind */
  width: 100%;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
}

header:hover,
header:focus-within {
  transform: translateY(0);
}

header:hover ~ .soundbutton,
header:focus-within ~ .soundbutton {
  transform: translateY(4rem);


}

.square {
  display: flex;            /* centers a piece inside */
  justify-content: center;
  align-items: center;
}

.square:nth-child(odd)  { background: #ffffff00; }
.square:nth-child(even) { background: var(--squarecolor);}


.square.Square-highlighted {
 box-shadow: inset 0 0 0 2px var(--hilight);
}

nav a,
nav a:visited {
  text-shadow: none;
  color: var(--hilight);
}


.square.Square-highlightedgreen {
 box-shadow: inset 0 0 0 2px var(--red);
}

header {
  --bluegaloo: #303030;
}

.introscreen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "heading heading"
    "one     two"
    "text    text";
  gap: 1.5rem;
  max-width: 50rem;
  margin: 0 auto;
}

.intro-text    { grid-area: text; color: var(--textcolor)}
.intro-heading { grid-area: heading; text-align: center; color: var(--textcolor)}
.Avianisfaction   { grid-area: one; color: var(--textcolor)}
.Nekorofaction   { grid-area: two; color: var(--textcolor)}

.faction-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  width:90%;
  font: inherit;                /* buttons don't inherit fonts by default */
  background: #474747b3;
  border: 2px solid #d8d8d8;
  cursor: pointer;
}
#everything {
margin-top: 5em;
margin-left:1em;
margin-right:1em;
display:none;

}

.startscreen {
margin-top: 5em;
margin-left:1em;
margin-right:1em;
display:flex;
 align-items: center;
 flex-direction: column;


}

.soundbutton {
  position: fixed;
  top: 3rem;
  left: 1rem;
  z-index: 1000;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
   transition: transform 0.3s ease-in-out;
}

.imagepile{

    text-align: center;
}
.faction-card:hover,
.faction-card:focus-visible {
  background-color: #000000;
  transform: scale(1.03);
   border: 2px solid var(--hilight);

}
.faction-card:hover .faction-name,
.faction-card:focus-visible .faction-name{
color: var(--hilight)}

.turnmarker{
display:none;

}

@media (max-width: 40em) {
  .introscreen {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "one"
      "two"
      "text";
  }
}

.pieceselect, #placepieces, #winorlose{
display:none;

}

.sidepanel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}



.choosablepiece:hover,
.selectedpiece {
background-image: url("../images/pixelshadow.png");
image-rendering: pixelated;
  background-repeat: no-repeat;
  background-size: 70% auto;
  background-position: 50% 95%;
}



#restart, #nextlevel 
{display:none;}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px); }
  40% { transform: translate(5px, -3px); }
  60% { transform: translate(-4px, 3px); }
  80% { transform: translate(3px, -2px); }
}

.shake {
  animation: shake 0.3s steps(5);
}

@media (prefers-reduced-motion: reduce) {
  .shake { animation: none; }
}

.pieceselect {
 max-width:100%;
  flex-wrap: wrap;
}

