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

body {
    background-color: #000;
    font-family: 'Fredoka One', cursive, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #a18cd1, #fbc2eb, #a1c4fd, #c2e9fb);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
}

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

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

/* UI Elements */
#top-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: center;
    pointer-events: auto;
    z-index: 10;
}

.stat-box {
    background: linear-gradient(180deg, #ffffff 0%, #ffefff 100%);
    border: 4px solid #fff;
    border-radius: 30px;
    padding: 10px 40px;
    font-size: 36px;
    color: #9c27b0;
    box-shadow: 0 8px 0 #e1bee7, 0 15px 25px rgba(0,0,0,0.3);
}

/* Screens */
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 100;
}

.screen:not(.hidden) {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.hidden {
    display: none !important;
}

.logo-box {
    font-size: 100px;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 0 #9c27b0);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

h1 {
    font-size: 80px;
    background: linear-gradient(180deg, #ffffff 0%, #ff66ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 8px 0 #9c27b0) drop-shadow(0 15px 20px rgba(0,0,0,0.3));
    margin-bottom: 10px;
    text-align: center;
}

p {
    color: #4a148c;
    font-size: 32px;
    margin-bottom: 40px;
    text-shadow: 0 2px 0 rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.5);
    padding: 10px 30px;
    border-radius: 20px;
}

.ui-button {
    font-family: 'Fredoka One', cursive, sans-serif;
    background: linear-gradient(180deg, #e040fb 0%, #aa00ff 100%);
    color: white;
    padding: 20px 70px;
    font-size: 48px;
    border-radius: 50px;
    border: 4px solid #f3e5f5;
    cursor: pointer;
    box-shadow: 
        0 12px 0 #6a1b9a,
        0 20px 30px rgba(0,0,0,0.4),
        inset 0 5px 0 rgba(255,255,255,0.4);
    transition: all 0.1s;
}

.ui-button:active {
    transform: translateY(12px) !important;
    box-shadow: 
        0 0px 0 #6a1b9a,
        0 5px 10px rgba(0,0,0,0.4),
        inset 0 5px 0 rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
    h1 { font-size: 56px; }
    .stat-box { font-size: 28px; }
}
/* CG-batch-overlay-fix */
#game-canvas, canvas#game-canvas { touch-action: none; }
#game-ui.screen,
#game-ui.screen.active { pointer-events: none !important; }
