:root {
    --primary-color: #87CEEB; /* Light Sky Blue */
    --secondary-color: #98FB98; /* Pale Green */
    --tertiary-color: #FFB6C1; /* Light Pink */
    --obstacle-red: #FF6B6B;
    --obstacle-cyan: #4ECDC4;
    --obstacle-blue: #45B7D1;
    --text-color: white;
    --background-dark: rgba(0,0,0,0.9);
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); /* Un font pixelat, opțional */

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Press Start 2P', cursive; /* sau 'Arial', sans-serif; */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--tertiary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: var(--text-color);
}

canvas {
    border: 3px solid var(--text-color);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    cursor: none;
    max-width: 95vw; /* Responsive adjustment */
    max-height: 95vh; /* Responsive adjustment */
    background-color: rgba(0,0,0,0.1); /* Fallback for canvas background */
}

#gameInfo {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--text-color);
    font-size: clamp(16px, 2vw, 20px); /* Responsive font size */
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 100;
}

#startScreen, #gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-dark);
    color: var(--text-color);
    padding: clamp(20px, 5vw, 40px); /* Responsive padding */
    border-radius: 20px;
    text-align: center;
    z-index: 200;
    backdrop-filter: blur(10px);
    width: clamp(280px, 80vw, 500px); /* Responsive width */
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

h1 {
    background: linear-gradient(45deg, var(--obstacle-red), var(--obstacle-cyan), var(--obstacle-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: clamp(28px, 6vw, 40px); /* Responsive font size */
    animation: neon-pulse 1.5s infinite alternate;
}

@keyframes neon-pulse {
    from { text-shadow: 0 0 5px rgba(255,255,255,0.5), 0 0 10px var(--obstacle-cyan); }
    to { text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px var(--obstacle-blue); }
}

.game-instructions {
    font-size: 14px;
    color: #ccc;
    margin-top: 20px;
    line-height: 1.4;
}

#letterSelection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); /* Responsive grid */
    gap: 10px;
    margin: 20px 0;
}

.letter-btn {
    background: linear-gradient(45deg, var(--obstacle-red), var(--obstacle-cyan));
    border: none;
    color: var(--text-color);
    padding: 10px; /* Adjusted for smaller buttons */
    font-size: clamp(16px, 3vw, 20px); /* Responsive font size */
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    width: clamp(40px, 8vw, 50px); /* Responsive width */
    height: clamp(40px, 8vw, 50px); /* Responsive height */
    aspect-ratio: 1 / 1; /* Keep circular shape */
    transition: all 0.3s ease;
    display: flex; /* For centering content */
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.letter-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

button {
    background: linear-gradient(45deg, var(--obstacle-red), var(--obstacle-cyan));
    border: none;
    color: var(--text-color);
    padding: 15px 30px;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive font size */
    border-radius: 25px;
    cursor: pointer;
    margin: 15px 10px 0; /* Adjusted margin for multiple buttons */
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

#gameOver {
    display: none;
}
