@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #202b31; /* Deep ocean background acting as outer void */
    font-family: 'Outfit', sans-serif;
    color: #fff;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Let drag/click pass through */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header {
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #d1ffd6;
}

.stats {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.1);
}

.coin-icon {
    margin-right: 8px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

main-ui {
    pointer-events: auto;
    display: flex;
    justify-content: center;
    padding-bottom: 2rem;
}

#toolbar {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.tool {
    width: 75px;
    height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

.tool:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.tool.active {
    background: rgba(135, 206, 235, 0.2);
    border-color: rgba(135, 206, 235, 0.7);
    box-shadow: 0 0 20px rgba(135, 206, 235, 0.4), inset 0 0 10px rgba(135, 206, 235, 0.2);
    transform: scale(1.1) translateY(-5px);
}

.tool .emoji {
    font-size: 2rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
    transition: transform 0.2s;
}

.tool.active .emoji {
    transform: scale(1.1);
}

.tool .label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

#notifications {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.notify {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    animation: floatUp 1.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
    white-space: nowrap;
    opacity: 1;
}

.notify.gain {
    color: #ffd700;
}

.notify.spend {
    color: #ff6b6b;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { transform: translateY(-20px) scale(1.2); opacity: 1; }
    80% { transform: translateY(-80px) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(0.9); opacity: 0; }
}
