body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

#encrypt-decode-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.tooltip {
    position: relative;
    display: inline-block;
}
  
.tooltip .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 150%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
}
  
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}
  
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

h1 {
    text-align: center;
}

input[type="text"] {
    width: 70%;
    padding: 10px;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

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

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.top-bar {
    background-color: #333;
    color: white;
    padding: 10px;
    text-align: center;
}

.game-container {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}


#game-canvas {
    border: 2px solid #000;
    margin: 10px auto; /* Add margin to the top and center the canvas horizontally */
}

/* CSS styles for the sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 200px; /* Adjust the width as needed */
    background-color: #f0f0f0;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    margin-bottom: 10px;
    font-size: 20px;
}

/* Style for the tower list */
#towerList {
    list-style-type: none; /* Remove default list styling */
    padding: 0;
}

#towerList li {
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#towerList li:hover {
    background-color: #ccc;
}

/* Style for the selected tower item */
.selected-tower {
    background-color: #007bff; /* Blue background color */
    color: #fff; /* White text color */
    font-weight: bold; /* Bold text */
}

/* CSS styles for the tower colors */
.tower-color {
    width: 20px; /* Adjust width as needed */
    height: 20px; /* Adjust height as needed */
    display: inline-block;
    margin-right: 5px; /* Adjust margin as needed */
    border: 1px solid black; /* Add border for clarity */
}

/* Add CSS styling for the sidebar */
#sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 200px; /* Adjust sidebar width as needed */
    background-color: #f0f0f0;
    padding: 20px;
    border-left: 1px solid #ccc;
    height: 100%; /* Fill the entire height of the viewport */
    overflow-y: auto; /* Add scroll if content overflows */
}

.enemy-info {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
}

/* CSS styles for the tower colors */
.enemy-color {
    width: 20px; /* Adjust width as needed */
    height: 20px; /* Adjust height as needed */
    display: inline-block;
    margin-right: 5px; /* Adjust margin as needed */
    border: 1px solid black; /* Add border for clarity */
}

#enemyList {
    list-style-type: none;
    padding: 0;
}

#next-wave-btn {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#next-wave-btn:hover {
    background-color: #45a049;
}

#start-game-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#start-game-btn, #encrypt {
    padding: 10px 20px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

#start-game-btn:hover {
    background-color: #45a049;
}

#map-selection-btn {
    padding: 10px 20px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

#map-selection-btn:hover {
    background-color: #45a049;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: center; /* Center items vertically */
    align-items: center; /* Center items horizontally */
}

.try-again-button {
    padding: 10px 20px;
    font-size: 18px;
    background-color: #ff0000; /* Red background */
    color: #ffffff; /* White text */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    outline: none; /* Remove default button outline */
}

.try-again-button:hover {
    background-color: #cc0000; /* Darker red on hover */
}

.score-display {
    font-size: 24px;
    color: #ffffff; /* White text */
    margin-bottom: 20px; /* Add some space between score and button */
}

/* CSS for map options container */
#map-options-container {
    text-align: center;
}

/* CSS for individual map options */
.map-option {
    display: inline-block;
    width: 30%; /* Adjust as needed */
    margin: 0 5px; /* Adjust as needed */
    vertical-align: top;
    text-align: center;
}

.map-option img {
    max-width: 100%;
}

/* Adjustments for mobile */
@media screen and (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    #game-canvas {
        max-width: 100%;
    }
}
