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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    text-align: center;
    padding: 20px;
}

h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.mode-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.mode-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 20px 40px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

.mode-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.game-container {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.status {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 20px;
    font-weight: bold;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 10px;
    margin: 0 auto 30px;
    width: fit-content;
}

.cell {
    background: #f0f0f0;
    border: 3px solid #667eea;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.cell:hover:not(.taken) {
    background: #e8e8e8;
}

.cell.taken {
    cursor: not-allowed;
}

.cell.x {
    color: #667eea;
}

.cell.o {
    color: #764ba2;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #5568d3;
}

.winner {
    background: #ffd700 !important;
}
