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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #333;
}

.container {
    text-align: center;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

h2 {
    margin-bottom: 1rem;
    color: #3498db;
    font-size: 1.5rem;
}

.game-mode {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.game-mode label {
    display: inline-block;
    margin-right: 10px;
    font-weight: bold;
    color: #2c3e50;
}

.game-mode select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 10px;
}

#difficulty-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.game-board {
    display: flex;
    flex-direction: column;
    margin: 0 auto 2rem;
    width: 300px;
    height: 300px;
}

.row {
    display: flex;
    flex: 1;
}

.cell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #34495e;
    transition: background-color 0.3s ease;
}

.cell:hover {
    background-color: #f1f1f1;
}

.cell.x {
    color: #e74c3c;
}

.cell.o {
    color: #2ecc71;
}

.row:first-child .cell {
    border-top: none;
}

.row:last-child .cell {
    border-bottom: none;
}

.cell:first-child {
    border-left: none;
}

.cell:last-child {
    border-right: none;
}

#reset-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

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

.winning-cell {
    background-color: #f9ed69;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* Bot thinking animation */
.bot-thinking::after {
    content: "Bot is thinking";
    display: block;
    color: #e67e22;
    font-style: italic;
    margin-top: 5px;
    animation: thinking 1.5s infinite;
}

@keyframes thinking {
    0% { content: "Bot is thinking."; }
    33% { content: "Bot is thinking.."; }
    66% { content: "Bot is thinking..."; }
}