:root {
    --bg-color: #0f172a; /* Slate 900 */
    --text-color: #f8fafc; /* Slate 50 */
    --primary-color: #7C3AED; /* Violet 600 */
    --primary-hover: #6D28D9; /* Violet 700 */
    --secondary-color: #A78BFA; /* Violet 400 */
    --accent-color: #F472B6; /* Pink 400 */
    --board-color: #1e293b; /* Slate 800 */
    --grid-line-color: #334155; /* Slate 700 */
    --player-one-color: #ef4444; /* Red 500 */
    --player-two-color: #eab308; /* Yellow 500 */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    box-sizing: border-box;
}

header {
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.ai-text {
    color: var(--primary-color);
}

.status-bar {
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 1.5em;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

select {
    background-color: var(--board-color);
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
    padding: 8px;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    text-transform: uppercase;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

.btn.primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.6);
}

.btn.secondary {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn.secondary:hover {
    background-color: rgba(167, 139, 250, 0.1);
}

.canvas-wrapper {
    position: relative;
    padding: 10px;
    background: var(--board-color);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(124, 58, 237, 0.2);
    width: 100%;
    max-width: 720px;
    aspect-ratio: 7/6;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.score-board {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
}

.score-item {
    text-align: center;
    background: rgba(30, 41, 59, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--grid-line-color);
    min-width: 120px;
}

.score-label {
    display: block;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 5px;
}

.score-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
}

.player-score .score-value {
    color: var(--player-one-color);
}

.ai-score .score-value {
    color: var(--player-two-color);
}

@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .controls { flex-direction: column; }
    .canvas-wrapper { padding: 5px; }
}
