/* General Styles */
.main {
    text-align: center;
    font-family: Arial, sans-serif;
    background-color: #74ff0327;
}

#game-board {
    background-color: #74ff03;
    margin-top: 0px;
    background: url('../img/map.png') no-repeat center center;
    background-size: cover;
    max-width: 100%;
    height: auto;
}

/* Slots */
#kingdom-slots {
    margin-top: 0px;
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.kingdom-slot {
    width: 100px;
    height: 100px;
    background-color: #74ff0336;
    border-radius: 0px;
    position: relative;
}

/* Default one tree */

.kingdom-slot.empty {
    width: 100px;
    height: 100px;
    background-color: #74ff0336;
    border-radius: 0px;
    position: relative;
}

.kingdom-slot.planting {
    background-color: green;
    border-radius: 50%;
}

.kingdom-slot.planting::after {
    content: '🌳'; /* Tree emoticon */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
}

.kingdom-slot.planting:hover::after {
    opacity: 1;
}

/* Building slots */
.kingdom-slot.building {
    background-color: rgb(0, 26, 255);
}

.kingdom-slot.building::before {
    content: '🔨'; /* Hammer/construction emoticon */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.kingdom-slot.planted {
    background-color: green;
}

.kingdom-slot.planted::after {
    content: '🐓'; /* Farm emoticon */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.kingdom-slot.castle {
    background-color: gray;
}

.kingdom-slot.castle::after {
    content: '🏰'; /* Castle emoticon */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.kingdom-slot.castle:hover::after {
    opacity: 1;
}

.kingdom-slot.church {
    background-color: gold;
}

.kingdom-slot.church::after {
    content: '⛪'; /* Church emoticon */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.kingdom-slot.church:hover::after {
    opacity: 1;
}

.kingdom-slot.statue {
    background-color: rgb(0, 26, 255);
}

.kingdom-slot.statue::before {
    content: '🏛️'; /* Statue emoticon */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.kingdom-slot.tower {
    background-color: gray;
}

.kingdom-slot.tower::after {
    content: '🧱'; /* Wall emoticon */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.kingdom-slot.planted:hover::after {
    opacity: 1;
}

/* Mining slots */
.kingdom-slot.mine {
    background-color: gray;
}

.kingdom-slot.mine::before {
    content: '🗺️'; /* Map emoticon for searching mines */
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.kingdom-slot.mine:hover::after {
    opacity: 1;
}

.kingdom-slot.mountain {
    background-color: #87CEFA;
}

.kingdom-slot.mountain::before {
    content: '💎'; /* Mountain emoticon */
    font-size: 20px;
    color: #87CEFA; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.3s;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid gray; 
    margin: 0;
}

.kingdom-slot.mountain:hover::after {
    opacity: 1;
}

.kingdom-slot.mining {
    background-color: #0d47a1;
}

.kingdom-slot.mining::before {
    content: '⛏️'; /* Pickaxe emoticon */
    font-size: 40px;
    color: gray; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.3s;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid gray; 
    margin: 0;
}

.kingdom-slot.mining:hover::after {
    opacity: 1;
}

/* Timer Styles */
.slot-timer {
    font-size: 16px;
    margin-top: 10px;
    position: absolute;
    bottom: 5px;
    width: 100%;
    text-align: center;
    color: white; /* Text color */
}

/* Stats Section */
#kingdom-stats {
    margin-bottom: 0px;
    font-size: 22px;
    background: linear-gradient(145deg, #f4c542, #d0a73b); /* Gold to brown gradient */
    width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

/* Medieval Notifications */
.realistic-scroll-banner {
    width: 88%;
    height: auto;
    background: #f8ecc2; /* Light parchment color */
    border: 4px solid #8b5a2b; /* Dark brown border for the scroll */
    padding: 3px 7px;
    text-align: center;
    font-family: 'Georgia', serif;
    font-size: 20px;
    font-weight: bold;
    color: #4b2e14; /* Dark text color to match the medieval theme */
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.3); /* More shadow for depth */
    position: relative;
    margin: 50px auto;
    border-radius: 10px;
    background: linear-gradient(to bottom, #fdf5e6 0%, #f5deb3 100%); /* Light parchment gradient */
    background-size: 100% 100%;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2); /* Inner shadow for parchment texture */
    border-top: 1px solid #8b4513; 
    border-bottom: 1px solid #8b4513;
    border-left: 3px solid #8b4513;
    border-right: 3px solid #8b4513;
}

.kingdom-message {
    max-width: 100%;
    font-size: 22px;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s;
}

/* Buttons */

/* Search mine button */
.mine-button-container {
    display: flex;
    justify-content: center; /* Horizontally center the button */
}

#search-mine-btn {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb); /* Light blue gradient */
    color: #0d47a1; /* Dark blue color for the text */
    border: 2px solid #0d47a1; /* Dark blue border */
    font-size: 16px;
    padding: 3px;
    border-radius: 1px;
    box-shadow: 0 4px 7px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    width: 150px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-transform: capitalize;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin: 20px;
    font-family: Arial, sans-serif; /* Ensure consistent font rendering */
}

#search-mine-btn::before {
    content: '🗺️'; /* World map emoticon */
    font-size: 40px;
    color: #0d47a1; /* Dark blue color to match the border */
    opacity: 0.8;
}

#search-mine-btn:hover {
    background: linear-gradient(145deg, #b3e5fc, #81d4fa); /* Lighter blue gradient for hover effect */
    border-color: #ffffff; /* White border on hover */
    color: #ffffff; /* White text on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), inset 0 3px 6px rgba(0, 0, 0, 0.2);
    transform: scale(1.03);
}

/* Build buttons */
#kingdom-build {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    justify-items: center;
    width: 100%;
    padding: 8px;
}

#kingdom-build button {
    background: linear-gradient(145deg, #ffeb99, #f1c40f);
    color: #3b2a1b;
    border: 2px solid #8db346;
    font-size: 16px;
    padding: 12px;
    border-radius: 15px;
    box-shadow: 0 4px 7px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-transform: capitalize;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

#kingdom-build button:hover {
    background: linear-gradient(145deg, #00e676, #004d40);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), inset 0 3px 6px rgba(0, 0, 0, 0.2);
    transform: scale(1.03);
}

/* Disabled State for Buttons */
button:disabled {
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
    transition: none;
}

button:disabled:hover {
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.3;
}

/* Responsive Design for Mobile */
@media only screen and (max-width:500px) {
    #kingdom-slots {
        grid-template-columns: repeat(4, 50px); /* Half the size */
    }
    .kingdom-slot {
        width: 50px; /* Half the size */
        height: 50px; /* Half the size */
    }
}