/* Reset and Base Styles */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #1a1a2e; /* Deep dark blue */
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas when game is active */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Screens */
.screen {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(22, 33, 62, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    pointer-events: auto; /* Re-enable clicks for menus */
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, #e94560, #0f3460);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #e94560;
}

p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Buttons */
button {
    padding: 15px 40px;
    margin: 10px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    outline: none;
    text-transform: uppercase;
}

button:active {
    transform: scale(0.95);
}

.primary-btn {
    background: #e94560;
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.secondary-btn {
    background: transparent;
    border: 2px solid #e94560;
    color: #e94560;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 30px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-btn.neon {
    color: #00e5ff;
    border-color: #00e5ff;
    text-shadow: 0 0 10px #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.ad-btn {
    background: #4caf50; /* Green for "money/positive" action */
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* HUD */
#score-display, #coins-display {
    position: absolute;
    top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

#score-display {
    left: 20px;
    color: #fff;
}

#coins-display {
    right: 20px;
    color: #00e5ff; /* Cyan for tokens */
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* Float Button */
.float-btn {
    position: absolute;
    bottom: 50px;
    right: 50px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.6);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 20;
    border: 3px solid #e94560;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.5);
    transition: opacity 0.3s, transform 0.2s, background 0.2s;
}

.float-btn:active {
    transform: scale(0.9);
    background: rgba(233, 69, 96, 0.9);
}

.float-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
}

.float-btn.active {
    background: #00e5ff;
    border-color: #00e5ff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
}

/* Shop Layout */
#skins-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.skin-item {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.skin-item.selected {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.2);
}

.skin-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}
