body {
    background: linear-gradient(to bottom, #000000 0%, #252525 22%, #181717 62%, #5e3a11 100%); 
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* ===================== */
/* GAME SCREEN           */
/* ===================== */
#screen {
    position: absolute;
    margin: auto;
    left: 0; 
    top: 0; 
    bottom: 0; 
    right: 0;
    border: 1px solid black;
    overflow: hidden;
    user-select: none;
}

#map {
    background: rgba(255, 255, 255, 0.5);
    position: relative;
    left: 10px;
    top: 10px;
    z-index: 99999;
}

#minimap { 
    position: absolute; 
}

#objects { 
    position: absolute; 
}

#floor {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #000 50%, #42301c 100%);







}

#ceiling {
    position: absolute;
    width: 100%;
    height: 50%;
    background-image: url("assets/ceiling.jpg");
}

/* ===================== */
/* HEALTH BAR STYLES     */
/* ===================== */
#health-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 25px;
    border: 2px solid #000;
    background: #d30303;
    border-radius: 8px;
    z-index: 100000 !important; /* force above everything */
}

#health-bar {
    height: 100%;
    width: 100%; /* starts at full HP */
    background: linear-gradient(to right, #f1f1f1, #edeeec);
    border-radius: 6px;
    transition: width 0.3s ease-in-out;
}

/* ===================== */
/* SETTINGS MENU BUTTON  */
/* ===================== */
#settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

#settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* ===================== */
/* SETTINGS MENU PANEL   */
/* ===================== */
#settings-menu {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 220px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #fff;
    border-radius: 12px;
    padding: 15px;
    display: none;  /* hidden by default */
    flex-direction: column;
    gap: 10px;
    z-index: 100002;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease-in-out;
}

#settings-menu button {
    width: 100%;
    padding: 10px;
    background: #222;
    color: #fff;
    border: 1px solid #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

#settings-menu button:hover {
    background: #444;
    transform: scale(1.05);
}

/* ===================== */
/* ANIMATIONS            */
/* ===================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Win Screen */
#win-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 48px;
    font-weight: bold;
    color: limegreen;
    display: none;
    z-index: 100000;
}
#win-screen button {
    margin-top: 20px;
    font-size: 20px;
    padding: 10px 20px;
    background: black;
    color: white;
    border: 2px solid white;
    border-radius: 6px;
    cursor: pointer;
}
