* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: #0f5e1f;
  font-family: sans-serif;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  touch-action: manipulation;
}

#game-board {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 2vw;
}

#top-section {
  display: flex;
  width: 100%;
  height: 20vh;
  margin-bottom: 2vh;
  justify-content: space-between;
}

#foundations-container {
  display: flex;
  width: 55%;
  justify-content: flex-end;
  gap: 2vw;
}

#stock-container, #waste-container {
  width: 13vw;
}

.spacer {
  flex-grow: 1;
}

#tableau-container {
  display: flex;
  width: 100%;
  height: 75vh;
  justify-content: space-between;
}

.pile {
  width: 13vw;
  height: 18.2vw;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  position: relative;
}

.card {
  width: 13vw;
  height: 18.2vw;
  border-radius: 4px;
  background-color: white;
  border: 1px solid #333;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5vw;
  font-size: 4vw;
  font-weight: bold;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.card.red {
  color: #d40000;
}

.card.black {
  color: #000000;
}

.card.hidden {
  background-color: #2b4b80;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,.1) 5px, rgba(255,255,255,.1) 10px);
  color: transparent !important;
  border: 1px solid #fff;
}

.card.hidden::before, .card.hidden::after {
  display: none;
}

.card::before {
  content: attr(data-value) " " attr(data-suit);
  align-self: flex-start;
}

.card::after {
  content: attr(data-value) " " attr(data-suit);
  align-self: flex-end;
  transform: rotate(180deg);
}

.tableau .card {
  position: absolute;
}

.selected {
  box-shadow: 0 0 8px 3px #ffea00;
  transform: translateY(-2px);
  z-index: 100 !important;
}

@media (min-aspect-ratio: 1/1) {
  .pile, .card {
    width: 8vw;
    height: 11.2vw;
    font-size: 2vw;
  }
}