:root {
    --bg-color: #fffbeb;
    --text-color: #451a03;
    --accent-color: #d97706;
    --muted-color: #92400e;
    --border-color: #fef3c7;
    --ui-bg: rgba(255, 251, 235, 0.85);
    --primary: var(--accent-color);
}

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

body {
    font-family: 'Roboto Mono', "Courier New", Courier, monospace;
    background-color: var(--bg-color);
    background-image: url('images/bg.png');
    background-size: cover;
    background-position: center;
    color: var(--text-color);
    overflow: hidden; /* Prevent scrolling since it's a fullscreen canvas */
    width: 100vw;
    height: 100vh;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to canvas */
    display: flex;
    flex-direction: column;
}

.header {
    pointer-events: auto; /* Re-enable clicks for UI elements */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--ui-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    flex-wrap: wrap;
    gap: 10px;
}

.controls {
    display: flex;
    gap: 10px;
}

.score-container {
    font-size: 1.5rem;
    font-weight: bold;
}

.next-colors {
    display: flex;
    gap: 10px;
    align-items: center;
}

.next-ball {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ccc;
    box-shadow: inset -3px -3px 6px rgba(0,0,0,0.2), 2px 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: var(--muted-color);
}

button:active {
    transform: scale(0.95);
}

#game-over {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--ui-bg);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

#game-over h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #e74c3c;
}

#game-over p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

#camera-tips {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 0.85rem;
    text-shadow: 0 0 8px rgba(255,255,255,0.8), 0 0 15px rgba(77,238,234,0.9), 0 0 20px rgba(77,238,234,0.8);
    pointer-events: none;
    text-align: center;
    width: 100%;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .score-container {
        font-size: 1.2rem;
    }
    
    .next-ball {
        width: 18px;
        height: 18px;
    }
    
    #camera-tips {
        font-size: 0.7rem;
        bottom: 10px;
    }
    
    button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}
