:root {
    --bg-color: #2c3e50;
    --ui-bg: rgba(255, 255, 255, 0.9);
    --accent-color: #ff9f43;
    --text-color: #333;
}

body {
    background-color: var(--bg-color);
    overflow: hidden; /* Prevent scrolling */
    touch-action: none; /* Prevent standard touch gestures */
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.roombound-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
    pointer-events: none; /* Let clicks pass through to canvas where possible */
}

.roombound-header * {
    pointer-events: auto; /* Re-enable pointer events for buttons */
}

.header-left h1 {
    font-size: 1.5rem;
    margin: 0;
    font-family: 'Fredoka', sans-serif;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.essence-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
}

.game-view {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%); /* Atmospheric background */
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated; /* Essential for the pixel art style */
}

/* Status Bubble */
.status-bubble {
    position: absolute;
    background: white;
    padding: 8px 12px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transform: translate(-50%, -100%); /* Center above target */
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: 'Fredoka', sans-serif;
    font-weight: 500;
}

.status-bubble.hidden {
    opacity: 0;
    transform: translate(-50%, -80%);
}

.status-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

/* Action Bar */
#action-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Shop Modal Styling */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.shop-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.shop-item:hover {
    border-color: var(--accent-color);
}

.item-icon {
    font-size: 32px;
    margin-bottom: 5px;
}

.item-name {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 500;
}

.item-cost {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .roombound-header {
        padding: 10px;
    }

    .header-left h1 {
        font-size: 1.2rem;
    }

    #action-bar {
        bottom: 15px;
        gap: 10px;
        padding: 8px;
    }

    .action-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
