body {
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    background-color: rgb(0, 0, 0);
    touch-action: none;
}

/* Battle drag and drop grid layout */
.battle-drag-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 10px;
    padding: 10px;
}

.battle-drag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: grab;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.2s;
}

.battle-drag-item:hover {
    background: rgba(0, 0, 0, 0.7);
}

.battle-drag-item:active {
    cursor: grabbing;
}

.battle-drag-item > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.battle-drag-item img {
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}

.battle-drag-item span {
    color: white;
    font-size: 12px;
    text-align: center;
    word-break: break-word;
}

#battle-setup-left {
    width: 300px; 
    padding: 20px; 
    overflow-y: auto; 
    overflow-x: hidden;
    background: rgba(0,0,0,0.3); 
    border-right: 2px solid white;
}

/* #main-menu-title {
    position: absolute;
    top: 20vh;
    background-image: url('./images/menus/MainMenuTitle.png');
    background-color: rgba(0, 0, 0, 0);
    height: 16vh;
    width: 60vw;
    margin-left: 20vw;
    margin-right: 20vw;
} */

.menu-title {
    font-size: 80px;
    font-weight: bold;
    color: #fff;
    margin: 20px;
}

.menu {
    display: block;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    z-index: 99;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 1);
    background-image: url('./images/menus/backgrounds/MainMenuCompressed.jpg');
}

#mainmenu {
    background-image: url('./images/menus/backgrounds/TitleMainMenuCompressed.png');
    z-index: 100;
}

#playmenu {
    display: none;
}

#start-button {
    margin-top: 10px;
}

.horizontal-flexbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background-color: rgba(0, 0, 0, 1);
    border-radius: 10px;
    padding: 10px;
    width: fit-content;
    height: fit-content;
    margin: 0 auto;
}

#dropdown-container {
    padding: 10px;
}

.menu-dropdown {
    border: 1px solid rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    border-radius: 10px;
    padding: 10px;
    display: block;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.menu-dropdown option {
    color: #fff;
    font-size: 30px;
    font-weight: normal;
}

.menu-dropdown:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
    border: 1px solid #fff;
}

#fireteam-info {
    padding: 10px;
}

.fireteam-member-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fireteam-member-list div {
    cursor: default;
    height: 36px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 32px;
    border-radius: 5px;
    font-weight: normal;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* .fireteam-member-list div:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
} */

.fireteam-member-list div img {
    vertical-align: top;
    width: 32px;
    display: inline;
    border-radius: 5px;
}

.fireteam-member-list div div {
    background-color: rgba(0, 0, 0, 0);
    display: inline;
    padding: 0px;
    margin: 0px;
}


.ship-image-wrapper {
    display: inline-block;
    /* The height of the container should be the original width of the image. */
    height: 32px; 
    /* The width of the container should be the original height of the image. */ 
    width: 80px;
}

.fireteam-ship-icon {
    width: 32px;
    transform: rotate(270deg) translate(-50%, -50%);
    transform-origin: top;
}

.fireteam-ship-icon:hover {
    transition: all 0.3s ease-in-out;
    transform: rotate(270deg) translate(-50%, -50%) scale(1.1);
}

.play-menu-info-title {
    font-size: 20px;
    font-weight: bold;
}

#settingsmenu {
    display: none;
    overflow: auto;
}

.settings-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 10px;
    width: fit-content;
    height: fit-content;
    margin: 8px auto;
}

.settings-item-name {
    font-size: 30px;
}

.input-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.settings-input {
    width: 30px;
    height: 30px;
}

.settings-slider {
    width: 200px;
    height: 8px;
    margin: 0 10px;
}

.settings-slider-value {
    font-size: 24px;
    min-width: 50px;
    text-align: left;
}

#highscoresmenu {
    display: none;
    overflow: auto;
}

#flex-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
}

#highscores {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.highscores-table {
    border-collapse: collapse;
    font-size: 30px;
    margin: 0 auto;
    border-radius: 10px;
}

.highscores-table th, .highscores-table caption {
    border: 1px solid #fff;
    padding: 10px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.7);
}

.highscores-table td {
    border: 1px solid #fff;
    padding: 5px;
    font-weight: normal;
    background-color: rgba(0, 0, 0, 0.7);
}

.highscore-player-entry {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: left;
    padding-left: 5px;
}

.highscore-name-entry {
    display: inline-block;
}

.ship-image-wrapper {
    display: inline-block;
    /* The height of the container should be the original width of the image. */
    height: 40px; 
    /* The width of the container should be the original height of the image. */ 
}

.highscore-ship-image {
    width: 40px;
    max-height: 100px;
    transform-origin: top;
    transform: rotate(270deg) translate(-50%, -50%);
}

.highscore-ship-image:hover {
    transition: all 0.3s ease-in-out;
    transform: rotate(270deg) translate(-50%, -50%) scale(1.1);
}

#highscore-ship-popup {
    position: fixed;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 1);
    border: 2px solid rgb(255, 255, 255);
    border-radius: 8px;
    padding: 10px;
    color: rgb(255, 255, 255);
}

.highscore-ship-popup-title {
    font-size: 20px;
    font-weight: bold;
}

.highscore-ship-popup-weapons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.highscore-ship-popup-weapon {
    font-size: 16px;
    font-weight: normal;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid rgb(255, 255, 255);
    border-radius: 10px;
    padding: 20px 40px;
    color: rgb(255, 255, 255);
    font-size: 18px;
    font-weight: bold;
    z-index: 10000;
    text-align: center;
}

.loading-text {
    margin: 0;
}

#friendsmenu {
    display: none;
}

#player-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.player-entry {
    border: 1px solid #fff;
    border-radius: 5px;
    padding: 5px;
    font-weight: normal;
}

.add-to-fireteam {
    background-image: url('./images/menus/icons/addteam.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: inline-block;
    margin-left: 10px;
}

#fireteam-invites {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999999;
}

.fireteam-invite {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    border-radius: 10px;
    padding: 10px;
}

.fireteam-invite-message {
    font-size: 20px;
    font-weight: normal;
}


.fireteam-invite-button {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    border-radius: 10px;
    padding: 10px;
}

#fireteammenu {
    display: none;
}


#accountmenu {
    display: none;
}

#account-window {
    padding: 5px;
    width: fit-content;
    height: fit-content;
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background-color: rgba(0, 0, 0, 1);
    border-radius: 2px;
    border: 3px solid rgb(63, 63, 63);
}

.icon-button {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 5px solid rgba(0, 0, 0, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

#online-players-icon {
    display: none;
    position: absolute;
    top: 0px;
    right: 75px;
    width: 24px;
    height: 24px;
    vertical-align: top;
    background-color: rgba(0, 0, 0, 0);
    border: 0px;
    padding: 0px;
    vertical-align: middle;
}

.login-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.vertical-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px;
}

.menu-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.menu-input {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    border-radius: 10px;
    padding: 10px 20px;
}

.menu-button {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    border-radius: 10px;
    padding: 10px 20px;
}

.menu-button:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
    border: 1px solid #fff;
}

.back-button {
    /* background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    border-radius: 10px;
    padding: 10px 20px;
    margin: 10px; */
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    background-image: url('./images/menus/icons/close.png');
    background-color: rgba(0, 0, 0, 0);
    border: 0px;
}


.back-button:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
    /* border: 1px solid #fff; */
}


#shipmenu {
    display: none;
    overflow: auto;
}

.weapon-keybind-popup {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 20px;
    z-index: 1000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    user-select: none;
}

.weapon-keybind-popup-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.7);
}
#gold-ship-list {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0);
    border: 0px;
    font-size: 44px;
    font-weight: bold;
}

#gold-ship-list-value {
    vertical-align: top;
    padding-left: 5px;
}

.gold-icon {
    width: 50px;
    height: 50px;
    vertical-align: top;
}

#ship-list {
    display: grid;
    grid-template-columns: repeat(3, 372px);
    gap: 20px;
    justify-content: center;
}

.ship-entry {
    border: 1px solid #fff;
    border-radius: 25px;
    padding: 10px;
    font-weight: normal;
    background-color: rgb(0, 0, 0);
    width: 350px;
}

.ship-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ship-image {
    width: 100px;
}

.ship-image:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
}

.ship-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ship-title {
    font-size: 29px;
    font-weight: bold;
}

.ship-content-title {
    font-size: 15px;
    font-weight: bold;
}

.keybind-toggle {
    height: 10px;
    width: 20px;
    margin-left: 10px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('./images/menus/icons/keyboard.png');
    display: inline-block;

}

.ship-buttons {
    margin-top: 5px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ship-button {
    background-color: rgba(99, 99, 99, 0.7);
    border: 1px solid rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    border-radius: 10px;
    padding: 5px 10px;
}

.ship-button:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
    border: 1px solid #fff;
}

.ship-button:disabled {
    background-color: rgba(99, 99, 99, 0.5);
    border: 1px solid rgba(0, 0, 0, 0);
    color: #ffffff86;
    font-size: 20px;
    font-weight: bold;
}

.ship-button:disabled:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1);
    border: 1px solid rgba(0, 0, 0, 0);
}

.ship-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: default;
}

.ship-stat-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 25px;
}

.ship-stat {
    font-size: 20px;
    font-weight: bold;
    display: inline-block;
    cursor: default;
    width: max-content;
}

.ship-stat-image {
    width: 20px;
    height: 20px;
    vertical-align: top;
    margin: 0px;
}

.armour-stat {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    cursor: default;
}

.armour-stat:last-child {
    margin-right: 0;
}

.armour-icon-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: bottom;
}

.armour-icon-canvas {
    display: block;
}

.armour-value-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
}

.ship-weapons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ship-weapon-keybind {
    height: 30px;
    width: 30px;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ship-weapon-keybind:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
}

.ship-weapon-keybind:active {
    transition: all 0.1s ease-in-out;
    transform: scale(0.95);
}

.ship-weapon-entry-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ship-weapon-entry {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 5px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0);
}

.ship-weapon-entry:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
    border: 1px solid #fff;
}

.ship-weapon {
    font-size: 18px;
    font-weight: bold;
}

.ship-weapon-image {
    width: 50px;
    height: 30px;
}

.ship-fighter-image img {
    height: 30px;
}

.hullmod-effects {
    font-size: 14px;
    margin-top: 5px;
    padding-left: 10px;
}

.hullmod-effects div {
    margin: 2px 0;
}

.hullmod-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 100%;
}

.hullmod-grid-item {
    min-width: 0;
    width: 100%;
}

.hullmod-slots-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.hullmod-slot {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: rgba(0, 0, 0, 0.3);
    position: relative;
}

.hullmod-slot:hover {
    border-color: #fff;
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.1);
}

.hullmod-slot-empty {
    border-style: dashed;
}

.hullmod-slot-plus {
    font-size: 32px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
    user-select: none;
}

.hullmod-slot-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.hullmod-popup-image {
    width: 40px;
    height: 40px;
    margin-right: 5px;
    flex-shrink: 0;
}

.hullmod-popup-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.hullmod-popup-entry:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    transform: scale(1.02);
}

.weapon-popup-equipped {
    background-color: rgba(0, 255, 0, 0.1);
}

.weapon-popup-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Weapon Popup Styles */
.weapon-popup {
    position: fixed;
    background-color: rgb(0, 0, 0);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 10px;
    z-index: 1000;
    min-width: 200px;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.weapon-popup-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #fff;
    padding-bottom: 5px;
}

.weapon-popup-empty {
    font-size: 16px;
    color: #888;
    text-align: center;
    padding: 10px;
}

.weapon-popup-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: 2px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.weapon-popup-entry-flexbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.weapon-popup-entry:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    transform: scale(1.02);
}

.weapon-popup-unequip {
    border-color: rgba(255, 100, 100, 0.5);
    color: #ff6666;
}

.weapon-popup-unequip:hover {
    background-color: rgba(255, 100, 100, 0.2);
    border-color: #ff6666;
}

.weapon-popup-image {
    width: 40px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
}

.weapon-popup-fighter {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
}

.weapon-popup-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    flex-grow: 1;
}

.weapon-popup-quantity {
    font-size: 20px;
    color: #ffffff;
    font-weight: bold;
    margin-left: 10px;
    min-width: 20px;
    text-align: right;
}

.weapon-popup-price {
    font-size: 14px;
    color: #ffd700;
    font-weight: bold;
    margin-left: 10px;
    min-width: 20px;
    text-align: right;
}

.weapon-popup-stats {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.weapon-popup-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.weapon-popup-stat-image {
    width: 20px;
    height: 20px;
    vertical-align: top;
    margin-right: 2px;
}

.weapon-popup-stat-value {
    font-size: 10px;
    font-weight: normal;
    color: #fff;
}

.weapon-popup-stat-value:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.05);
}

.weapon-preview-popup {
    position: fixed;
    background-color: rgb(0, 0, 0);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 10px;
    z-index: 1001;
    width: 400px;
    height: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.weapon-preview-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #fff;
    padding-bottom: 5px;
}

.weapon-preview-canvas-container {
    flex: 1;
    position: relative;
    background-color: rgb(20, 20, 30);
    border-radius: 4px;
    overflow: hidden;
}

.weapon-preview-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#game {
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: crosshair;
    user-select: none;
}

#game-canvas {
    width: 100%;
    height: 100%;
    background-color: rgb(0, 0, 0);
    user-select: none;
}

/* Stat Popup Styles */
.stat-popup {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.95);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 12px;
    z-index: 10000;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.stat-popup-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    border-bottom: 1px solid #fff;
    padding-bottom: 4px;
}

.stat-popup-description {
    font-size: 14px;
    font-weight: normal;
    color: #ccc;
    line-height: 1.4;
}

/* Hullmod Hover Popup Styles */
.hullmod-hover-popup {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.95);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 12px;
    z-index: 10000;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.hullmod-hover-popup-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    border-bottom: 1px solid #fff;
    padding-bottom: 4px;
}

.hullmod-hover-popup-description {
    font-size: 14px;
    font-weight: normal;
    color: #ccc;
    line-height: 1.4;
    margin-bottom: 8px;
}

.hullmod-hover-popup-effects {
    font-size: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.hullmod-hover-popup-effects div {
    margin: 2px 0;
}

#game-menu {
    display: none;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background-color: rgba(0, 0, 0, 1);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 10px;
    z-index: 1000;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    user-select: none;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 0 20px rgb(255, 255, 255);
}

#mission-complete {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background-color: rgba(0, 0, 0, 1);
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 10px;
    z-index: 1000;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    user-select: none;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 0 20px rgb(255, 255, 255);
    user-select: none;
}

#mission-complete-title {
    /* font-size: 48px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    text-decoration: underline; */
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 441px;
    height: 150px;
    margin: 0 auto;
}

#scores-title {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    text-align: center;
}

#mission-complete-button {
    background-color: rgba(0, 0, 0, 0.7);
}

#mission-complete-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background-image: url('./images/menus/backgrounds/GameBackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mission-complete-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #fff;
    padding-bottom: 5px;
}

.gold-text {
    color: rgb(255, 215, 0);
}
.mission-complete-gold-icon {
    width: 20px;
    height: 20px;
}

.mission-complete-total-gold {
    font-size: 60px;
    font-weight: bold;
    color: rgb(255, 255, 255);
}

.mission-complete-total-gold-icon {
    width: 64px;
    height: 64px;
    vertical-align: text-bottom;
    margin-right: 3px;
}

#game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: absolute;
    z-index: 900;
    background-color: rgba(0, 0, 0, 0);
    padding: 10px;
    border: 0px;
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    user-select: none;
    pointer-events: none; /* Allow clicks to pass through to canvas below */
}

/* Make game-info smaller on mobile */
@media (hover: none) and (pointer: coarse) {
    #game-info {
        font-size: 25.5px; /* 30 * 0.85 */
        padding: 8.5px; /* 10 * 0.85 */
        gap: 8.5px; /* 10 * 0.85 */
    }
    
    .game-info-icon {
        width: 25.5px; /* 30 * 0.85 */
        height: 25.5px; /* 30 * 0.85 */
        margin-right: 8.5px; /* 10 * 0.85 */
    }
}

#fireteam-player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: absolute;
    z-index: 899;
    background-color: rgba(0, 0, 0, 0);
    padding: 10px;
    border: 0px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    user-select: none;
    pointer-events: none; /* Allow clicks to pass through to canvas below */
}

.fireteam-player-info-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.fireteam-player-name {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.fireteam-player-lifebar {
    height: 10px;
    width: 100px;
    background-color: rgb(100, 100, 100);
    border-radius: 2px;
    border: 1px solid black;
    position: relative;
    overflow: hidden;
}

.fireteam-player-lifebar-durability {
    position: absolute;
    top: 0;
    left: 0;
    height: 10px;
    background-color: rgb(0, 132, 0);
    border-radius: 2px;
    z-index: 1;
}

.fireteam-player-lifebar-shield {
    position: absolute;
    top: 0;
    left: 0;
    height: 10px;
    background-color: rgb(0, 94, 255);
    border-radius: 2px;
    z-index: 2;
    opacity: 0.8;
}


.game-info-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    vertical-align: text-bottom;
}

/* Damage Indicator Styles */
.damage-indicator {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.damage-value {
    font-size: 10px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.damage-label {
    font-size: 12px;
    color: #cccccc;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-top: -2px;
    letter-spacing: 1px;
}

/* Enhanced damage indicator animations */
.damage-indicator.high-damage .damage-value {
    color: #ff0000 !important;
    /* text-shadow: 0 0 10px rgba(255, 0, 0, 0.8); */
}

.damage-indicator.medium-damage .damage-value {
    color: #ff8800 !important;
    /* text-shadow: 0 0 8px rgba(255, 136, 0, 0.6); */
}

.damage-indicator.low-damage .damage-value {
    color: #ff4444 !important;
}

@keyframes pulse {
    from { 
        transform: scale(1); 
        text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
    }
    to { 
        transform: scale(1.1); 
        text-shadow: 0 0 15px rgba(255, 0, 0, 1);
    }
}

/* Fade out animation when resetting */
.damage-indicator.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    from { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
    to { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Mobile Joystick */
#mobile-joystick-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 150px;
    height: 150px;
    z-index: 950;
    pointer-events: none;
}

#mobile-joystick-base {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(100, 100, 100, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.8);
    pointer-events: auto;
    touch-action: none;
}

#mobile-joystick-stick {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(200, 200, 200, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.9);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.1s ease-out;
}