:root {
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --board-bg: #ffffff;
    --grid-color: rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

header {
    text-align: center;
    width: 100%;
}

.back-btn {
    display: inline-block;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s;
    width: 100%;
    text-align: left;
    font-weight: 500;
}

.back-btn:hover {
    opacity: 1;
    color: var(--accent-green);
}

h1 {
    font-weight: 800;
    letter-spacing: 2px;
}

h1 span {
    color: var(--accent-green);
    text-shadow: 0 0 10px var(--accent-green);
}

.status-board {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    padding: 0 1rem;
}

#scoreText {
    font-size: 1.5rem;
    font-weight: 600;
}

button {
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--accent-green);
    color: #ffffff;
    border-color: var(--accent-green);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.canvas-container {
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

canvas {
    background-color: var(--board-bg);
    display: block;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border-radius: 10px;
    z-index: 10;
}

.overlay.hidden {
    display: none;
}

.overlay h2 {
    color: var(--accent-red);
    font-size: 2.5rem;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.mobile-controls button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.horizontal {
    display: flex;
    gap: 50px;
}

@media (max-width: 600px) {
    canvas {
        width: 300px;
        height: 300px;
    }
    .mobile-controls {
        display: flex;
    }
}
