@charset "UTF-8";

@font-face {
  font-family: ElfrethTest-Regular;
  src: url('https://bosskingfight.netlify.app/assets/css/content/ElfrethTest-Regular.otf');
}

/* Full-screen overlay for the end-game message */
#end-game-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    font-weight: bold;
    color: white;
    z-index: 1000;
    text-align: center;
    animation: blowUp 1s ease-in-out, crazyColors 3s infinite;
    display: none;
    text-shadow: 0 0 10px #fff, 0 0 20px #ff00ff, 0 0 30px #ff00ff, 0 0 40px #ff00ff, 0 0 50px #ff00ff;
}

/* Blow-up effect */
@keyframes blowUp {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Crazy color-flashing effect */
@keyframes crazyColors {
    0% {
        color: red;
    }
    25% {
        color: darkred;
    }
    50% {
        color: rebeccapurple;
    }
    75% {
        color: rgb(93, 8, 45);
    }
    100% {
        color: purple;
    }
}


/* General body styling */
body {
    font-family: ElfrethTest-Regular;
    text-align: center;
    margin: 0;
    padding: 20px;
    background-image: url('../../content/bg.jpg');
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* Headline styling */
h1 {
    font-family: ElfrethTest-Regular;
    font-size: 44px;
    color: red;
    -webkit-text-stroke: 2px black;
    -webkit-filter: drop-shadow(5px 1px 1px #222);
    filter: drop-shadow(2px 1px 5px rgb(218, 218, 218))
}

/* Boss container */
#boss {
    margin: 10px auto;
    width: 230px;
    height: 400px;   
    position: relative;
}

#boss-image {
    width: 80%;
    height: 80%;
    object-fit: fill;
    position: relative;
    -webkit-filter: drop-shadow(5px 5px 5px #222);
  filter: drop-shadow(5px 5px 5px rgb(100, 100, 100));
}

#damage-message {
    position: absolute;
    font-family: Helvetica, sans-serif;
    top: 50%;
    left: 120%;
    transform: translate(-50%, -50%); /* Center horizontally and vertically */
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.8); /* Darker background for readability */
    padding: 15px; /* Slightly larger padding for better spacing */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    display: none;
    max-width: 500px; /* Increased width for longer text */
    text-align: center; /* Center-align the text for better readability */
}


/* Boss health container */
#boss-health-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px; /* Adjust spacing between the boss and health container */
}

/* Health text */
#boss-health {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 5px; /* Space between the text and health bar */
    -webkit-filter: drop-shadow(3px 3px 3px #222);
    filter: drop-shadow(3px 3px 3px rgb(178, 178, 178));
}

/* Health bar container */
#health-bar-container {
    width: 80%; /* Width relative to the boss image */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    height: 15px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.7);
    overflow: hidden; /* Clip the health bar inside the container */
    position: relative;
}

/* Health bar (dynamic width) */
#health-bar {
    height: 100%;
    background: linear-gradient(90deg, red, darkred);
    width: 100%; /* Starts full, updates dynamically */
    transition: width 0.3s ease-in-out; /* Smooth transition when updating */
    border-radius: 5px 0 0 5px; /* Round left side */
}


/* Tools container */
#tools {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 6px;
}

.tool {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    -webkit-filter: drop-shadow(5px 5px 5px #222);
  filter: drop-shadow(5px 5px 5px rgb(149, 149, 149))
}
/* Positioning and styling the counter */

.tool {
    position: relative; /* Enables positioning of child elements */
}

.tool-counter {
    position: absolute;
    top: -10px;
    right: -10px;
    background: red;
    color: white;
    font-size: 0.8rem;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}


.tool img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
}


.tool:hover img {
    transform: scale(1.1);
}

/* Highlight effect for selectable tools */
.tool.highlight {
    border: 2px solid yellow;
    animation: pulse 1s infinite;
}

/* Keyframes for the highlight pulse effect */
@keyframes pulse {
    0% {
        box-shadow: 0 0 10px yellow;
    }
    50% {
        box-shadow: 0 0 20px yellow;
    }
    100% {
        box-shadow: 0 0 10px yellow;
    }
}

/* Potion message styling */
#potion-message {
    color: orange;
    font-size: 1.2rem;
    margin-top: 20px;
    font-weight: bold;
}

/* Notification box styling */
#notification {
    position: fixed;
    bottom: 37%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 1.2rem;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
}

/* Show the notification box */
#notification.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Style for tool names */
.tool-name {
    margin-top: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    text-align: center;
    -webkit-text-stroke: #222;
    -webkit-text-stroke-width: 0.9px;
    -webkit-filter: drop-shadow(5px 5px 5px #222);
  filter: drop-shadow(5px 5px 5px rgb(178, 178, 178))
}
