.Hud {
    position: absolute;
    width: 100%;
    height: 100%;
    /*background-color: rgba(255, 192, 192, 0.233);*/
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Arial', sans-serif;
    font-size: 20px;
    color: black;
}

#ChatContainer {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 600px;
    height: 200px;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 4px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    /* Apply a blurred box-shadow */
    -webkit-box-shadow: inset 0px 0px 15px 5px rgba(0, 0, 0, 0.3); /* Webkit browsers */
    -moz-box-shadow: inset 0px 0px 15px 5px rgba(0, 0, 0, 0.3); /* Firefox */
    box-shadow: inset 0px 0px 15px 5px rgba(0, 0, 0, 0.3); /* Standard */
}

#ChatMessages {
    flex: 1;
    overflow-y: auto;
    color: white;
    margin-bottom: 10px;
}

#ChatInputContainer {
    display: flex;
    align-items: center;
}

#ChatInput {
    flex: 1;
    padding: 5px;
    border: none;
    border-radius: 3px;
}

.chatbutton {
    font-family: 'press_start_2pregular';
    color: black;
    background-color: #ffffff;
    font-size: 0.6em;
    font-weight: 300;
    box-shadow: inset 0 -4px 0 0 rgba(0, 0, 0, 0.2);
    transition: 0.1s;
    text-shadow: 0px 2px rgba(0, 0, 0, 0.2);
    appearance: none;
    outline: none;
    margin: 0;
    cursor: pointer;
    padding: 10px 5px;
    border-radius: 8px;
    pointer-events: auto;
}

#ChatResizeHandleHeight {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0);
    position: absolute;
    top: 0;
    cursor: n-resize;
}

#ChatResizeHandleWidth {
    width: 10px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    position: absolute;
    right: 0;
    cursor: e-resize;
}

.chat-message {
    display: flex;
    flex-direction: row;
    margin-bottom: 8px;
    padding: 5px;
    background-color: #00000081;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-time {
    font-size: 0.5em;
    color: #888;
    margin-right: 5px;
}

.chat-name {
    font-weight: bold;
    margin-right: 5px;
    font-size: 0.8em;

}

.chat-content {
    color: #ffffff;
    word-wrap: break-word;
    margin-left: 5px;
    font-size: 0.8em;
}


.hp-bar-container {
    position: relative;
    width: 300px;
    height: 25px;
    background-color: #444;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #222;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-bar {
    position: absolute;
    left: 0;
    height: 100%;
    transition: width 0.3s ease-in-out;
}


#HpText {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
    z-index: 2;
}


.hp-bar.high {
    background: linear-gradient(to right, #4caf50, #2e7d32); /* Green */
}

.hp-bar.low {
    background: linear-gradient(to right, #ff9800, #e65100); /* Orange */
}

.hp-bar.critical {
    background: linear-gradient(to right, #f44336, #b71c1c); /* Red */
}


#HpText {
    margin-top: 5px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
}

@keyframes blinkBorder {
    0% { border-color: red; }
    50% { border-color: transparent; }
    100% { border-color: red; }
}

.hp-bar-container.blinking-border {
    animation: blinkBorder 0.7s infinite;
}

.mp-bar-container {
    position: relative;
    width: 300px;
    height: 25px;
    background-color: #222;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #111;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.mp-bar {
    position: absolute;
    left: 0;
    height: 100%;
    transition: width 0.3s ease-in-out;
}

.mp-bar.high {
    background: linear-gradient(to right, #2196F3, #1565C0); /* Blue */
}

.mp-bar.low {
    background: linear-gradient(to right, #64B5F6, #1976D2); /* Lighter Blue */
}

.mp-bar.critical {
    background: linear-gradient(to right, #BBDEFB, #42A5F5); /* Almost empty */
}

#MpText {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
    z-index: 2;
    text-align: center;
    width: auto;
    left: 50%;
    transform: translateX(-50%);
}


.xp-bar-container {
    position: relative;
    width: 300px;
    height: 25px;
    background-color: #222;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #111;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.xp-bar {
    position: absolute;
    left: 0;
    height: 100%;
    transition: width 0.3s ease-in-out;
}

.xp-bar.high {
    background: linear-gradient(to right, #FFD700, #DAA520); /* Gold gradient */
}

.xp-bar.low {
    background: linear-gradient(to right, #DAA520, #B8860B); /* Darker gold */
}

.xp-bar.critical {
    background: linear-gradient(to right, #B8860B, #8B6914); /* Darkest gold */
}

#XpText {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
    z-index: 2;
    text-align: center;
    width: auto;
    left: 50%;
    transform: translateX(-50%);
}


#HudButtons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row; /* Align buttons in a row */
    gap: 10px;
    background-color: #11111170;
}

#HudButtons .hud-button {
    width: 80px; /* Adjust as needed */
    height: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* Adjust text color if needed */
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
    cursor: pointer;
    outline: none;
}

#HudButtons button img {
    margin-bottom: 5px; /* Space between icon and text */
}

.stats-btn {
    background-image: url("/media/Game/UI/Icons/statsIcon.png");
}

.inv-btn {
    background-image: url("/media/Game/UI/Icons/invIcon.png");
}

#HudButtons button span {
    font-size: 1.5;
    text-align: center;
    display: block;
    max-width: 100%;
    overflow: hidden;
}


#HudButtons button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#HudButtons button:active {
    transform: scale(0.95);
}

.chat-header{
    font-size: 1em;
    font-weight: bold;
    color: white;
    text-align: left;
    margin-bottom: 10px;
}