* {
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: #87CEEB; /* Sky blue */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    touch-action: none;
}

#canvas-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 by default */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

/* Stats */
.stats-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    pointer-events: auto;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.stat {
    margin-bottom: 10px;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat-label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bar-bg {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease-out;
}

/* Hint */
#interaction-hint {
    text-align: center;
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-size: 18px;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

/* Controls */
.controls-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    pointer-events: auto;
    padding-bottom: 10px;
}

.action-btn {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 6px 0 #d1d8e0, 0 10px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 100px;
    transition: transform 0.1s, box-shadow 0.1s;
}

.action-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 #d1d8e0, 0 4px 4px rgba(0,0,0,0.15);
}

.action-btn .icon {
    font-size: 28px;
}