/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* App container */
#app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2rem;
  color: #2c3e50;
}

/* Main layout */
main {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* Board container */
#board-container {
  flex-shrink: 0;
}

#board {
  width: 600px;
  max-width: 100%;
}

/* Sidebar */
#sidebar {
  flex: 1;
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-width: 200px;
}

/* Status display */
#status {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2c3e50;
}

/* Message display */
#message {
  font-size: 1rem;
  color: #7f8c8d;
  margin-bottom: 1.5rem;
  min-height: 1.5rem;
  font-style: italic;
}

/* Engine selector */
#engine-selector {
  margin-bottom: 1rem;
}

#engine-selector label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
}

#engine-selector select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #bdc3c7;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

#engine-selector select:hover {
  border-color: #95a5a6;
}

#engine-selector select:focus {
  outline: none;
  border-color: #3498db;
}

/* Controls */
#controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#controls button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#controls button:hover {
  background-color: #2980b9;
}

#controls button:active {
  background-color: #21618c;
}

#controls button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

/* Chessboard square highlights */
.highlight1-32417,
.highlight2-9c5d2 {
  box-shadow: none !important;
  border: 2px solid white !important;
}

/* Responsive design */
@media (max-width: 768px) {
  main {
    flex-direction: column;
  }

  #board {
    width: 100%;
    max-width: 600px;
  }

  #sidebar {
    width: 100%;
  }

  #app {
    padding: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }
}
