/* css/game.css */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background: #f0f8ff;
  background: url('/images/cards.png') repeat-y center center fixed;
  background-size: cover;
}

h1, h2, h3 {
  color: #333;
  text-align: center;
  margin-top: 20px;
}

.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
}

.hand-column {
  width: 120px;
}

#board-column {
  width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game-board {
  display: grid;
  grid-template-columns: repeat(4, 100px);
  grid-gap: 5px;
  margin-bottom: 20px;
  background: #fff;
  background-image: url('/images/nightshift.jpg'); /* Update the path as needed */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cell {
  width: 100px;
  height: 150px;
  border: 2px dashed #ccc;
  background: #fafafa;
  position: relative;
  text-align: center;
  font-size: 12px;
  border-radius: 4px;
}

.board-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.board-card .board-top,
.board-card .board-right,
.board-card .board-bottom,
.board-card .board-left {
  font-weight: bold;
  color: #333;
}
.board-card .board-top {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
}
.board-card .board-right {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
}
.board-card .board-bottom {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}
.board-card .board-left {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.hand-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-wrap: wrap;
}

.card {
  position: relative;
  width: 80px;
  height: 120px;
  border: 2px solid #666;
  background: linear-gradient(135deg, #e0ffff, #f0fff0);
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.card:hover {
  transform: scale(1.05);
}
.card .card-front {
  position: relative;
  width: 100%;
  height: 100%;
}
.card .card-top,
.card .card-right,
.card .card-bottom,
.card .card-left {
  font-weight: bold;
  color: #333;
}
.card .card-top {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
}
.card .card-right {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}
.card .card-bottom {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
}
.card .card-left {
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}
.card .card-name {
  display: none;
}
.card.selected {
  border: 3px solid #007BFF;
}

.card.npc {
  background: #444;
  color: #fff;
  text-align: center;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #222;
  border-radius: 8px;
}

/* Disable long press / text selection on card images */
.card-image {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  max-width: 600px;
  border-radius: 8px;
}

.modal-content .close {
  font-size: 32px;
  position: absolute;
  right: 20px;
  top: 10px;
  cursor: pointer;
}

.modal-content h3,
.modal-content h4 {
  text-align: center;
  color: #333;
}

.modal-content p {
  text-align: center;
  color: #333;
}
