body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
  }
  
  #start-menu {
    padding: 2rem;
    text-align: center;
  }
  
  #game-container {
    display: flex;
    height: 100vh;
  }
  
  #left-panel {
    flex: 3;
    padding: 1rem;
  }
  
  #right-panel {
    flex: 1;
    border-left: 2px solid #ddd;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  #board {
    display: grid;
    grid-template-columns: repeat(15, 30px);
    grid-template-rows: repeat(15, 30px);
    gap: 1px;
    margin-bottom: 1rem;
  }
  
  .board-cell {
    width: 30px;
    height: 30px;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    text-align: center;
    vertical-align: middle;
    line-height: 30px;
    font-weight: bold;
    position: relative;
  }
  
  /* Special tile styles */
  .tw {
    background-color: #ff6b6b;
  }
  
  .dw {
    background-color: #ffa5a5;
  }
  
  .tl {
    background-color: #6b9cff;
  }
  
  .dl {
    background-color: #a5c0ff;
  }
  
  .center-star {
    background-color: #ffdd67;
  }
  
  .special-text {
    font-size: 8px;
    position: absolute;
    top: 2px;
    left: 2px;
    pointer-events: none;
    color: rgba(0, 0, 0, 0.6);
  }
  
  .star-symbol {
    font-size: 14px;
    color: #ff3838;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  /* Drag and drop styles */
  .drag-over {
    background-color: #e0ffe0;
    box-shadow: inset 0 0 5px green;
  }
  
  .suggested {
    background-color: #ffffaa;
    box-shadow: 0 0 10px gold;
  }
  
  .hint-letter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #2a5aa0;
    font-weight: bold;
    opacity: 0.7;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  }
  
  #tile-rack {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    min-height: 50px;
    padding: 10px;
    background-color: #e8e0cf;
    border-radius: 10px;
    border: 2px solid #c9b18a;
    justify-content: center;
    align-items: center;
  }
  
  .tile {
    width: 30px;
    height: 30px;
    background-color: #f2eecb;
    border: 1px solid #555;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    cursor: move;
    position: relative;
    border-radius: 3px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .tile .point-value {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 8px;
    color: #666;
  }
  
  .tile.placed-tile {
    cursor: default;
  }
  
  .tile.cpu-tile {
    background-color: #b99c6b;
    color: transparent;
  }
  
  #controls {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    margin-top: -10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  button {
    padding: 8px 12px;
    background-color: #4a7dbd;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  button:hover {
    background-color: #3a6da7;
  }
  
  button:disabled {
    background-color: #9fafcb;
    cursor: not-allowed;
  }
  
  .current-player {
    font-weight: bold;
    color: #2a5aa0;
  }
  
  #chatbot {
    margin-top: 1rem;
  }
  
  #chat-log {
    height: 200px;
    overflow-y: scroll;
    border: 1px solid #aaa;
    padding: 5px;
    background: #fafafa;
    margin-bottom: 5px;
  }
  
  #chat-log .bot {
    color: blue;
    font-weight: bold;
  }
  
  #chat-log .player {
    color: green;
  }
  
  /* Thinking indicator */
  #thinking-indicator {
    padding: 8px;
    text-align: center;
    margin-bottom: 8px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
  }
  
  .thinking-brain {
    font-size: 18px;
    color: #2ecc71; /* Green initially */
    margin-right: 10px;
    animation: pulse-brain 1.5s infinite;
  }
  
  @keyframes pulse-brain {
    0% { transform: scale(0.8); color: #2ecc71; }
    50% { transform: scale(1.2); color: #333333; }
    100% { transform: scale(0.8); color: #2ecc71; }
  }
  
  .thinking-text {
    margin-left: 8px;
    font-size: 14px;
    color: #555;
  }
  
  @keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
  }
  
  /* API Status Indicator */
  .api-status {
    display: inline-block;
    margin-left: 5px;
    font-size: 14px;
  }
  
  .api-status.connected i {
    color: #2ecc71; /* Green */
    filter: drop-shadow(0 0 3px #2ecc71);
  }
  
  .api-status.disconnected i {
    color: #e74c3c; /* Red */
    filter: drop-shadow(0 0 3px #e74c3c);
  }
  
  .api-status.connecting i {
    color: #f39c12; /* Orange */
    filter: drop-shadow(0 0 3px #f39c12);
    animation: pulse 1.5s infinite;
  }
  
  #chat-input {
    width: 75%;
    padding: 5px;
  }
  
  #sendChatBtn {
    padding: 6px;
  }
  
  /* Game-end modal */
  #game-end-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
  }
  
  .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    width: 80%;
    text-align: center;
  }
  
  .winner {
    color: #d4af37;
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  }
  
  #final-scores, #game-stats {
    margin: 15px 0;
    text-align: left;
  }
  
  #final-score-list {
    list-style-type: none;
    padding-left: 10px;
  }
  
  #final-score-list li {
    margin: 5px 0;
    padding: 3px;
    background-color: #f8f8f8;
    border-radius: 3px;
  }
  
  #new-game-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #4a7dbd;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
  }
  
  #new-game-btn:hover {
    background-color: #3a6da7;
  }
  
  /* Exchange mode */
  .exchange-mode {
    background-color: rgba(255, 235, 205, 0.6);
    border: 2px dashed #d4af37;
    border-radius: 8px;
  }
  
  .selected-for-exchange {
    transform: translateY(-10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #f39c12;
  }
  
  /* Button visibility */
  #exchangeBtn, #confirmExchangeBtn, #acceptRecommendationBtn {
    transition: display 0.3s;
  }
  