body {
    margin: 0;
    overflow: hidden;
    background-color: #222;
    font-family: 'Fredoka', sans-serif;
    color: white;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: #333;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 10;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #e0e0e0;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}

.secondary-btn {
    background-color: #555;
    color: white;
}

.secondary-btn:hover {
    background-color: #666;
}

#game-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas */
}

/* Hotbar */
#hotbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px;
    border-radius: 5px;
    pointer-events: auto;
}

.slot {
    width: 40px;
    height: 40px;
    border: 2px solid #555;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    font-size: 12px;
}

.slot.selected {
    border-color: #ffff00;
    box-shadow: 0 0 5px #ffff00;
}

.slot-icon {
    width: 24px;
    height: 24px;
}

.slot-count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px;
    color: white;
    text-shadow: 1px 1px 0 #000;
}

/* Instructions */
#instructions {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    pointer-events: auto;
    max-height: 80vh;
    overflow-y: auto;
}

#instructions p {
    margin: 5px 0;
    font-size: 14px;
}

/* Tooltip */
#tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
    font-size: 12px;
    display: none;
    z-index: 100;
}
