* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Setup Screen */
.setup-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
}

.card h2 {
  color: #667eea;
  margin-bottom: 20px;
  font-size: 2rem;
}

.card h3 {
  color: #667eea;
  margin-bottom: 15px;
  margin-top: 30px;
  font-size: 1.5rem;
}

.card p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

select {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 20px;
  cursor: pointer;
  background: white;
  transition: border-color 0.3s;
}

select:hover {
  border-color: #667eea;
}

select:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

.rules ul {
  list-style: none;
  padding-left: 0;
}

.rules li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.6;
}

.rules li:last-child {
  border-bottom: none;
}

/* Game Screen */
.game-header {
  margin-bottom: 30px;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label {
  font-weight: 600;
  color: #666;
  font-size: 1.1rem;
}

.player-name {
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
}

/* Board */
.board-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.board {
  display: grid;
  grid-template-columns: repeat(8, 70px);
  grid-template-rows: repeat(8, 70px);
  gap: 0;
  background: white;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  border: 8px solid #8B4513;
}

.cell {
  width: 70px;
  height: 70px;
  background: #f0d9b5;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b58863;
  position: relative;
}

/* Checkerboard pattern - add class dynamically */
.cell.dark {
  background: #b58863;
}

.cell.light {
  background: #f0d9b5;
}

.cell:hover {
  transform: scale(1.05);
  box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.3);
}

.piece {
  width: 60px;
  height: 60px;
  transition: all 0.2s;
  pointer-events: none;
}

.piece svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.cell.selected {
  border: 3px solid white;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px currentColor;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.cell.valid-move {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  border: 2px solid #667eea;
  animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
  }
}

.cell.valid-move:hover {
  transform: scale(1.2);
}

/* Game Info */
.game-info {
  display: flex;
  justify-content: center;
}

.game-info .card {
  max-width: 600px;
}

.game-info ul {
  list-style: none;
  padding-left: 0;
}

.game-info li {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 1rem;
  line-height: 1.6;
}

.game-info li:last-child {
  border-bottom: none;
}

/* Footer */
footer {
  text-align: center;
  color: white;
  margin-top: 50px;
  padding: 20px;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .board {
    grid-template-columns: repeat(8, 50px);
    grid-template-rows: repeat(8, 50px);
    padding: 15px;
    border-width: 5px;
  }

  .cell {
    width: 50px;
    height: 50px;
  }

  .piece {
    width: 42px;
    height: 42px;
  }

  .card {
    padding: 30px 20px;
  }

  .status-bar {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .board {
    grid-template-columns: repeat(8, 35px);
    grid-template-rows: repeat(8, 35px);
    padding: 10px;
    border-width: 3px;
  }

  .cell {
    width: 35px;
    height: 35px;
  }

  .piece {
    width: 30px;
    height: 30px;
  }
}

/* Gingerbread piece styling handled via SVG inline colors */

