body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #ffffff;
}

header {
    display: none; /* Hide the header bar */
}

h1 {
    font-size: 2rem;
    color: #00d1b2;
    text-align: center;
    margin: 30px 0;
}

#progress-container {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Adds space between elements in the container */
}

.progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the label and progress bar */
    gap: 5px;
}

.progress-wrapper {
    position: relative; /* Needed for absolute positioning of the text */
    width: 200px; /* Set width to the same as the progress bar */
}

progress {
    width: 100%; /* Make progress bar take full width of the container */
    height: 15px;
    margin: 0; /* No margin applied to progress bars */
    border-radius: 5px;
    -webkit-appearance: none;
    appearance: none;
}

progress[value] {
    color: #fff;
    background-color: #444;
}

progress::-webkit-progress-bar {
    background-color: #444;
    border-radius: 5px;
}

progress::-webkit-progress-value {
    background-color: #00d1b2; /* Cyan color */
    border-radius: 5px;
}

progress::-moz-progress-bar {
    background-color: #00d1b2; /* Cyan color */
    border-radius: 5px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: white;
    font-weight: bold;
}

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.server-card {
    position: relative;
    background-color: #333;
    background-size: cover;
    background-position: center;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin: 15px;
    width: 300px;
    height: 200px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.server-card h2 {
    font-size: 1.5rem;
    color: #00d1b2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.server-card p {
    font-size: 1rem;
    margin: 10px 0;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
}

.server-card * {
    position: relative;
}

.player-count-box {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75); /* 75% opaque black background */
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 1; /* Ensure it appears above the card background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.status-container {
    padding: 5px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    color: white;
    width: 250px;
}

.status-online {
    background-color: #28a745;
    border: 2px solid #218838;
}

.status-offline {
    background-color: #dc3545;
    border: 2px solid #c82333;
}

/* Button Styles */
.control-btn {
    padding: 5px 8px; /* Smaller padding for width and height */
    font-size: 0.9rem; /* Reduced font size */
    font-weight: bold;
    border: none;
    border-radius: 3px; /* Slightly smaller rounded corners */
    cursor: pointer;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    transition: background-color 0.3s, transform 0.2s;
    width: 80px; /* Explicitly set a smaller width */
}

.control-btn:hover {
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.start {
    background-color: #00bcd4; /* Green */
    border: 2px solid #00bcd4;
}

.control-btn.start:hover {
    background-color: #0097a7;
}

.control-btn.stop {
    background-color: #f39c12; /* Red */
    border: 2px solid #f39c12;
}

.control-btn.stop:hover {
    background-color: #e67e22;
}

.status-starting {
    background-color: #e67e22; /* Orange background */
    border: 2px solid #d35400; /* Darker orange border */
}

/* Style for the "Keep running" button */
.keep-running-btn {
    position: absolute;
    right: 10px;  /* Position it on the right */
    top: 10px; /* Position it near the top */
    padding: 8px;
    background-color: #05308A; /* Green */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem; /* Reduced font size */
    font-weight: bold;
    width: auto;  /* Make it the default width based on content */
    z-index: 2; /* Ensure it appears above other elements */
}

.keep-running-btn:hover {
    background-color: #0A459C; /* Slightly darker green on hover */
}

/* Style for the "Keep running" label */
.keep-running-label {
    position: absolute;
    right: 10px;  /* Position it on the right */
    top: 10px; /* Position it near the top */
    padding: 8px;
    background-color: #1c7c00; /* Green */
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem; /* Reduced font size */
    font-weight: bold;
    width: auto;  /* Make it the default width based on content */
    z-index: 2; /* Ensure it appears above other elements */
}
