* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #e9ebee;
}

/* CONNECTION STATUS ICON */
.status-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 8px;
}
.status-icon.red { background-color: red; }
.status-icon.green { background-color: green; }
.status-icon.orange { background-color: orange; }

/* TILE HIGHLIGHT STYLES */
.newly-placed {
  border: 2px solid #4CAF50;
  background-color: #e0ffe0;
}

.recommended-tile {
  background-color: #fff3cd;
  border: 2px dashed #ffcc00;
}

/* GENERAL LAYOUT */
.start-menu {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.start-menu-layout {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.connection-panel,
.player-setup {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  width: 300px;
}

.setup-field {
  margin-bottom: 1rem;
}

.primary-button {
  background-color: #4CAF50;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.primary-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.secondary-button {
  background-color: #888;
  color: white;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.game-area {
  padding: 1rem;
}

.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr 2fr;
  gap: 1rem;
}

.panel-title {
  margin: 0.5rem 0;
}

.board {
  display: grid;
  grid-template-columns: repeat(15, 30px);
  grid-template-rows: repeat(15, 30px);
  gap: 1px;
  background-color: #666;
  padding: 5px;
  border: 2px solid #333;
}

.board div {
  width: 30px;
  height: 30px;
  background-color: #f0f0f0;
  text-align: center;
  vertical-align: middle;
  line-height: 30px;
  font-weight: bold;
}

.tile {
  width: 30px;
  height: 30px;
  background-color: #ffffcc;
  border: 1px solid #aaa;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  cursor: grab;
}

.tile.dragging {
  opacity: 0.5;
}

.special-TW { background-color: #ff9999; }
.special-DW { background-color: #ffcccc; }
.special-TL { background-color: #9999ff; }
.special-DL { background-color: #ccccff; }

.score-panel,
.history-panel,
.chat-panel,
.rack-panel {
  background: #fff;
  padding: 0.5rem;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

.controls-row button {
  margin: 0.25rem;
  padding: 0.4rem 0.6rem;
}

.chat-log {
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  margin-bottom: 0.5rem;
}

.chat-log .bot {
  color: green;
  font-weight: bold;
}

.chat-log .user {
  color: blue;
}

.chat-input-container {
  display: flex;
  gap: 0.5rem;
}

.chat-input-container input {
  flex: 1;
  padding: 0.4rem;
}

.timer {
  font-size: 1.2rem;
  font-weight: bold;
}

#recommendation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.overlay.hidden {
  display: none;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 400px;
  max-width: 90%;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.stats-box {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.brain-icon {
  animation: pulse 1s infinite alternate;
  margin-right: 8px;
}

@keyframes pulse {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

