/*=====================================================================================
BODY
=======================================================================================*/
*,
body {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    font-family: Arial, sans-serif;
    user-select: none;
}

body {
    background-color: #222;
    color: #fff;
}

#game {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #333333;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/*=====================================================================================
UPGRADES
=======================================================================================*/
#upgrades-container {
    float: left;
    width: 30%;
    max-width: 16.5%;
    max-height: 53%;
    padding: 20px;
    background-color: #333;
    border-radius: 5px;
    color: #fff;
    margin-right: 10px;
    position: absolute;
    top: 0px;
    overflow-x: auto;
}

/*=====================================================================================
BUTTONS
=======================================================================================*/
button,
.mnuButton,
#ametystButton,
#ametystButton:hover {
    background-color: #0074D9;
    color: #fff;
    border: none;
    padding: 10px 20px; /* this */
    margin: 5px; /* this */
    cursor: pointer;
    border-radius: 5px;
    font-family: 'Germania One', cursive;
    font-size: 16px;
}

button:hover,
.mnuButton:hover {
    background-color: #0056b3;
}

/*=====================================================================================
RESOURCES
=======================================================================================*/
#ametyst,
#ametystCount,
#totalAmetyst,
#totalAmetystCount {
    color: #965ecd;
    font-weight: bolder;
    font-family: 'Times New Roman', Times, serif;
}


#goldCount,
#gold {
    color: #f1c40f;
    font-weight: bold;
}

#rubiesCount,
#rubies {
    color: #9B111E;
    font-weight: bold;
}

/*=====================================================================================
SHOP
=======================================================================================*/

#shopItems {
    padding: 20px;
    border-radius: 5px;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

.shop-item {
    flex: 1;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    /* To distribute items evenly */
    gap: 20px;
    /* Adjust the gap between items as needed */

}

.shop-item b {
    color: #FDFEFF;
    display: block;
    margin-bottom: 10px;
}

.shop-item-description {
    color: #666;
    margin-bottom: 10px;
}

.shop-item-price {
    color: #00b300;
    font-weight: bold;
}

.shop-item-purchased {
    color: #ff0000;
}

/*=====================================================================================
BUILDINGS
=======================================================================================*/
.shopItems {
    /* this is actually just the building container */
    float: right;
    width: 17%;
    max-height: 72.9%;
    grid-template-columns: auto auto;
    grid-gap: 10px;
    padding: 20px;
    background-color: #333;
    border-radius: 5px;
    color: #fff;
    margin-left: 10px;
    position: absolute;
    top: 0px;
    right: 0px;
    overflow-x: hidden;
    overflow-y: auto;
    height: 75%;
}

.building-container {
    display: block;
    padding: 20px;
    /* background-color: #333; */
    border-radius: 5px;
    color: #fff;
    margin: 0 0 10px 10px;
    position: relative;
    overflow-x: hidden;
    width: 90%;
}

#building-name {
    color: #8A2BE2;
    font-weight: bolder;
}

/* 
update the achievements so that whenever you dont have any achievements,
all the achievements actually are there, but when hovering over them, 
then say "Achievement ???: (??? = achievement name) locked ( in #FF0000 color ) 
*/
#building-description {
    color: #CCCCCC;
    font-weight: bolder;
}

#building-count-name,
#building-count {
    text-align: left;
    font-size: 16px;
    margin-bottom: 5px;
    color: #66FF99;
    font-weight: bolder;
}

#building-price-name,
#building-price {
    text-align: right;
    font-size: 16px;
    color: #66FF99;
    font-weight: bolder;
}

.building-container button {
    width: 100%;
    background-color: #0074D9;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'Germania One', cursive;
    font-size: 14px;
}

.building-container button:hover {
    background-color: #0056b3;
}

.building {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 100px;
    /* background-color: #ccc; */
    margin: 10px;
    cursor: pointer;
    overflow: visible;
    text-align: center;
    white-space: nowrap;
}

.building .building-info {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: auto;
    width: 100%;
    max-width: 100%;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    z-index: 1;
    white-space: normal;
    overflow: hidden;
    max-height: 100px;
    overflow-y: auto;
}

.building:hover .building-info {
    display: block;
}

/*=====================================================================================
CHAT
=======================================================================================*/
.custom-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.popup-content {
    font-size: 18px;
}

#achievementsContainer,
#conversionsContainer {
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    display: none;
    color: #fff;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.modal-content {
    background-color: #333;
    border-radius: 5px;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

#customPopup {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

#popupContent {
    font-size: 16px;
}

#chat-box {
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    color: #fff;
}

#chat-messages {
    max-height: 200px;
    overflow-y: scroll;
}

#chat-input {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}





#exportedSaveGameText {
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    color: #fff;
}

#importFileInput {
    display: none;
}

#showAchievementsButton,
#showConversionsButton {
    background-color: #3498db;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.stats-modal {
    display: none;
}

#gameVersion {
    text-align: center;
    width: 100px;
    color: #808080;
    font-weight: bolder;
    border-radius: 5px;
    border: 1px solid white;
    position: absolute;
    top: 475px;
    background-color: white;
}

#gameVersion:hover::after {
    content: attr(data-content);
    text-align: center;
    /* border: 1px solid black; */
    background-color: #ccc;
    /* border-radius: 5px; */
    /* width: 200px; */
    /* height: 50px; */
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    position: fixed;
    top: 420px;
    left: 0;
    color: white;
    background-color: #808080;
}

#resources p,
#resources span,
#totalResourcesSection p,
#totalResourcesSection span,
#buildingsSection p,
#buildingsSection span {
    display: inline;
}

#theme-selector,
#language-selector {
    font-size: 14.5px;
    font-weight: bold;
    background-color: #333333;
    color: #ccc;
}

/*=====================================================================================
TEST
=======================================================================================*/
.ACmodal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.achievement-modal-content {
    background-color: #333;
    border-radius: 5px;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

#achievements-modal {
    display: none;
}

.achievement-element,
#achievementsContainer {
    width: 100px;
}


/*=====================================================================================
CONTEXT MENU
=======================================================================================*/
#shop,
#save,
#export,
#import,
#reset,
#tutorial,
#changelog,
#stats,
#help,
#tasks,
#prestige {
    background-color: #333;
    padding: 10px;
    color: #fff;

}

.context-menu {
    display: none;
    /* Initially hide the context menu */
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    /* Start with 0 opacity */
    transition: opacity 0.2s ease;
    /* Add a transition for the opacity property */
}

#custom-context-menu {
    width: 150px;
    display: none;
    position: absolute;
    background-color: white;
    color: black;
    border: 1px solid #ccc;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    /* Use a common system font */
    font-size: 12px;
    /* Adjust font size */
}

#custom-context-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#custom-context-menu ul li {
    padding: 6px 20px;
    cursor: pointer;
    line-height: 1.6;
    white-space: nowrap;
    border-bottom: 1px solid #ccc;
    user-select: none;
}

#custom-context-menu ul li:last-child {
    border-bottom: none;
}





























































/* Style for the Prestige Shop modal */
#prestige-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* background-color: rgba(0, 0, 0, 0.7); */
}

.prestige-modal-content {
    background-color: #333;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 60%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Style for Prestige Shop items */
.prestige-shop-item {
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px;
    /* background-color: #fff; */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: left;
}


/* fix the background-color on the hover */
.prestige-shop-item:hover {
    background-color: #ccc;
    cursor: pointer;
}

.prestige-shop-item-name {
    font-size: 18px;
    font-weight: bold;
}

.prestige-shop-item-description {
    font-size: 14px;
}

.prestige-shop-item-price {
    font-size: 16px;
    color: #008000;
    /* Green color for price */
}

/* Close button for the Prestige Shop modal */
.modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal-content .close:hover {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}