body {
    margin: 0;
    padding: 0;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    font-family: sans-serif;
    color: white;
    overflow: hidden; /* Prevents scrolling on mobile */
    touch-action: none; /* Prevents browser-native zoom/pan */
}

#game-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
	border-radius: 15px; /* Matches the rounded aesthetic */
    overflow: hidden;
    z-index: 1;
}

/* Rounded corners for any external image assets (like in editor or gallery) */
.collectable-preview, img[src*="images/"] {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensures the full 800x600 game fits the screen */
    border: 2px solid #444;
    background: #222;
}

.ui {
    position: absolute;
    top: 10px;
    left: 10px;
    pointer-events: none;
}

.header-controls {
    position: absolute;
    top: 0px;
    right: 5px;
    display: flex;
    gap: 0px;
    z-index: 1001;
    pointer-events: auto;
}

.inventory-header-btn {
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 83, 218, 0.2);
    border: 1px solid #2E53DA;
    border-radius: 5px;
    padding: 5px;
}

.inventory-header-btn:hover {
    background: rgba(46, 83, 218, 0.3);
}

.inventory-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.inventory-icon-fallback {
    font-size: 20px;
    line-height: 20px;
    display: block;
}

.inventory-count {
    position: absolute;
    top: -2px;
    right: -6px;
    background: #2E53DA;
    color: #000;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 4px;
    border: 1px solid #000;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
}

.header-btn {
    padding: 8px;
    background: transparent;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.header-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
    vertical-align: middle;
    display: block;
}

/* ============================================
   DIFFICULTY BADGE
   ============================================ */

#levelset-difficulty-badge {
    position: absolute;
    top: 60px;
    right: 10px;
    z-index: 1000;
    pointer-events: none;
}

.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.difficulty-beginner { background: #20962B; color: #ddd; }
.difficulty-easy { background: #006400; color: #ddd; }
.difficulty-medium { background: #4A90E2; color: #111; }
.difficulty-hard { background: #ffaa00; color: #111; }
.difficulty-expert { background: #aa1010; color: #ddd; }

/* ============================================
   GAME FRAME - Simple grey border
   ============================================ */

.game-frame {
    position: relative;
    display: inline-block;
    border: none;
    border-radius: 15px; /* Match game-container rounded corners */
    box-shadow: 0 0 0 1.5px #333; /* Consistent border appearance with increased spread */
}

/* ============================================
   START SCREEN ANIMATIONS
   ============================================ */

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