.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 2px;
    background-color: #333;
    width: fit-content;
    margin: 20px auto;
}

.cell {
    width: 100px;
    height: 100px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    font-family: Arial, sans-serif;
    cursor: pointer;
}

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

.cell.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.clear-button {
    display: block;
    width: 200px;
    height: 50px;
    margin: 20px auto;
    font-size: 24px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#winMessage {
    text-align: center;
    font-size: 90px;
    font-family: Arial, sans-serif;
    margin: 20px auto;
    color: #4CAF50;
    font-weight: bold;
    animation: winPulse 1s infinite alternate;
}

@keyframes winPulse {
    from {
        transform: scale(1);
        opacity: 0.9;
    }
    to {
        transform: scale(1.05);
        opacity: 1;
    }
}

.metrics-link {
    text-align: center;
    margin: 20px auto;
}

.metrics-link a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    transition: background-color 0.2s;
}

.metrics-link a:hover {
    background-color: #2a70c2;
}

.version {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-family: monospace;
    font-size: 12px;
    color: #666;
}

/* Highlight classes for piece placement - used to avoid direct style manipulation */
.highlight-x {
    background-color: #c8e6c9 !important; /* Light green */
    transition: background-color 0.3s ease-in-out;
}

.highlight-o {
    background-color: #ffcdd2 !important; /* Light red */
    transition: background-color 0.3s ease-in-out;
}

/* Status indicators for Nano connection state */
.status-indicator {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.status-indicator.connected {
    background-color: #4caf50; /* Green */
    box-shadow: 0 0 10px #4caf50;
}

.status-indicator.disconnected {
    background-color: #f44336; /* Red */
    box-shadow: 0 0 10px #f44336;
}

.status-indicator.waiting {
    background-color: #ff9800; /* Orange */
    box-shadow: 0 0 10px #ff9800;
    animation: pulse 1s infinite;
}

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

.status-text {
    vertical-align: middle;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

/* Visual state indicators for cells */
.cell.nano-disconnected {
    background-color: #ffebee !important; /* Very light red */
    cursor: not-allowed;
}

.cell.nano-wait {
    background-color: #fff8e1 !important; /* Very light orange */
    cursor: wait;
}

.cell.game-over {
    background-color: #eceff1 !important; /* Light gray */
    cursor: not-allowed;
}
