* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

html, body {
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
}

input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

body {
    background-color: #050505;
    color: #fff;
    font-family: 'Press Start 2P', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

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

#uiLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 14px;
    font-weight: normal;
    text-shadow: 0 0 5px #00ffcc;
    pointer-events: auto;
}

#highScoreDisplay {
    position: absolute;
    top: 48px;
    left: 20px;
    font-size: 10px;
    color: #aaa;
    font-weight: normal;
    pointer-events: auto;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    transition: opacity 0.3s;
}

/* Center overlay instructions text */
.overlay p {
    text-align: center;
}

/* Increase paragraph line spacing for better readability */
p {
    line-height: 1.6;
}
 
.hidden {
    opacity: 0;
    pointer-events: none;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #00ffcc;
    text-transform: uppercase;
    text-shadow: 0 0 10px #00ffcc;
    letter-spacing: 2px;
}

.color-selector {
    margin: 25px 0 30px;
    text-align: center;
}

.color-selector .label {
    font-size: 10px;
    color: #888;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

#swatchContainer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.swatch:hover {
    transform: scale(1.1);
}

.swatch.active {
    transform: scale(1.2);
    border-color: #fff;
    box-shadow: 0 0 15px currentColor;
}

.game-options {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 10px;
}

button {
    padding: 12px 24px;
    font-size: 12px;
    background: #00ffcc;
    color: #000;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: normal;
    box-shadow: 0 0 15px #00ffcc;
    transition: transform 0.1s, box-shadow 0.1s;
}

button:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px #00ffcc;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.secondary-btn {
    background: transparent;
    border: 2px solid #00ffcc;
    box-shadow: none;
    color: #00ffcc;
}

.secondary-btn:hover {
    background: rgba(0, 255, 204, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
    transform: scale(1.05);
}

/* Countdown overlay */
.countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s;
}

.countdown span {
    font-size: 40px;
    font-weight: normal;
    color: #00ffcc;
    text-shadow: 0 0 25px #00ffcc;
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 5px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 8px;
    color: #888;
    z-index: 10;
    pointer-events: auto;
}

.app-footer a {
    color: #00ffcc;
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}

