:root {
    --primary-bg: #f0f2f5;
    --game-start-bg: #b8e3e9;
    --score-bg: #ff99cc;
    --history-bg: #ffc266;
    --bot-bg: #4d9900;
    --control-bg: #b3d9ff;
    --board-green: #006600;
    --board-cell: #ffffff;
    --text-dark: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: var(--primary-bg);
    padding: 20px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.board-container {
    width: 600px;
    height: 600px;
    margin: 20px auto;
    position: relative;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    gap: 1px;
    background-color: #e0e0e0;
    border: 2px solid #666;
    width: 100%;
    height: 100%;
}

.board-cell {
    background-color: #fff;
    border: 1px solid #ccc;
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    text-align: center;
}

.board-cell.triple-word {
    background-color: #ff9999;
}

.board-cell.double-word {
    background-color: #ffb366;
}

.board-cell.triple-letter {
    background-color: #99ff99;
}

.board-cell.double-letter {
    background-color: #99ccff;
}

.board-cell.star {
    background-color: #ffcc99;
}

.board-cell.star::before {
    content: "★";
    position: absolute;
    font-size: 24px;
    color: #666;
    z-index: 1;
}

.tile {
    width: 36px;
    height: 36px;
    background-color: #f4d03f;
    border: 1px solid #666;
    border-radius: 3px;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: move;
    z-index: 2;
    font-size: 16px;
    line-height: 1;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.tile.dragging {
    opacity: 0.6;
}

.tile-score {
    font-size: 10px;
    margin-top: 2px;
}

.player-rack {
    display: flex;
    gap: 5px;
    padding: 10px;
    background-color: #8b4513;
    border-radius: 5px;
    margin: 10px 0;
    min-height: 50px;
    align-items: center;
}

.controls {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.button:hover {
    background-color: #45a049;
}

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

.chat-container {
    width: 300px;
    margin-left: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    max-width: 80%;
}

.user-message {
    background-color: #e3f2fd;
    color: #1565c0;
    margin-left: auto;
}

.ai-message {
    background-color: #f5f5f5;
    color: #333;
}

.chat-input {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ccc;
}

.chat-input input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 8px;
}

.chat-input button {
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.game-start {
    text-align: center;
    margin-bottom: 20px;
}

.game-start.inactive {
    opacity: 0.5;
    pointer-events: none;
}

.game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.score {
    font-size: 18px;
    color: #666;
}

.recommendation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1;
}

.recommendation-tile {
    position: absolute;
    width: 36px;
    height: 36px;
    background-color: rgba(244, 208, 63, 0.7);
    border: 1px dashed #666;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    z-index: 3;
}

.recommendation-controls {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.accept-button {
    background-color: #4CAF50;
}

.deny-button {
    background-color: #f44336;
}

/* Game Start Section */
.game-start {
    background-color: var(--game-start-bg);
    padding: 20px;
    border-radius: 15px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.3s ease;
}

.retro-connection {
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-icon {
    width: 20px;
    height: 20px;
    background-color: #4CAF50;
    border-radius: 50%;
}

/* Score and Stats Section */
.score-stats {
    background-color: var(--score-bg);
    padding: 20px;
    border-radius: 15px;
    grid-column: 1 / -1;
}

.score-section, .stats-section {
    margin-bottom: 15px;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.game-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background-color: var(--control-bg);
    cursor: pointer;
}

.game-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bottom Sections */
.bottom-sections {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.game-history {
    background-color: var(--history-bg);
    padding: 20px;
    border-radius: 15px;
    height: 300px;
    overflow-y: auto;
}

.scrabble-bot {
    background-color: var(--bot-bg);
    padding: 20px;
    border-radius: 15px;
    color: white;
    height: 300px;
    display: flex;
    flex-direction: column;
}

#chatHistory {
    flex-grow: 1;
    overflow-y: auto;
    margin: 10px 0;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex-grow: 1;
    padding: 8px;
    border: none;
    border-radius: 5px;
}

.chat-input button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background-color: white;
    color: var(--bot-bg);
    cursor: pointer;
}

/* Chat Messages */
#chatHistory p {
    margin: 5px 0;
}

#chatHistory p strong {
    color: inherit;
}

#chatHistory .player-message {
    color: #000;
}

#chatHistory .bot-message {
    color: #fff;
}

/* Special Tiles */
.double-letter::before {
    content: "DL";
}

.triple-letter::before {
    content: "TL";
}

.double-word::before {
    content: "DW";
}

.triple-word::before {
    content: "TW";
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 1fr;
    }
    
    .bottom-sections {
        grid-template-columns: 1fr;
    }
} 