/* Base Styles */
body {
    font-family: 'Roboto', Arial, sans-serif; /* Use Roboto as the main font */
    background: linear-gradient(to bottom, #2c2f33, #23272a); /* Updated gradient background */
    min-height: 100vh; /* Ensure the background covers the full height */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

header {
    width: 100%;
    padding: 50px 20px 20px; /* Add more padding at the top */
    text-align: center;
}

.header-content img {
    max-width: 400px; /* Increase the size of the logo */
    height: auto;
}

.user-info {
    position: absolute;
    top: 20px; /* Adjust top padding to align with overall page */
    right: 20px;
    display: inline-block;
    padding: 20px 20px 0 0; /* Add padding to the top and right */
}

#user-name {
    color: #99aab5; /* Darker color by default */
    font-weight: bold; /* Bold by default */
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 5px;
    transition: color 0.3s;
}

#user-name:hover {
    color: white;
}

.logout-popup {
    display: none;
    position: absolute;
    top: 100%; /* Position below the admin text */
    right: 0;
    background-color: rgba(58, 63, 68, 0.9); /* Subtle background with transparency */
    padding: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    color: white;
    width: 100px;
    text-align: center;
    margin-top: 5px; /* Space between the admin text and the popup */
}

.logout-popup a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: background-color 0.3s;
}

.logout-popup a:hover {
    background-color: #4e5d6c; /* Match button hover color */
}

.webgui-link {
    text-decoration: none; /* Remove underline from the link */
}

main {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.server-box {
    background-color: #3a3f44; /* Updated background color */
    border-radius: 10px;
    padding: 20px 30px; /* Add padding to the left and right sides */
    margin: 10px 0; /* Stack the boxes vertically */
    width: 100%;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle drop shadow */
    display: flex;
    align-items: center;
}

.server-logo {
    width: 50px;
    height: auto;
    margin-right: 40px; /* Increase space between logo and server name */
}

.server-info {
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
}

.server-info h2 {
    margin: 0;
    color: #fff; /* White text for headers */
    flex: 2;
    margin-right: 40px; /* Decrease space between server name and controls */
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-bottom: 10px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #666; /* Darker background for the slider */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4e5d6c; /* Match the button color */
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.webgui-button {
    display: block;
    padding: 10px 20px;
    background-color: #4e5d6c; /* Updated button color */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    text-decoration: none;
}

.webgui-button.disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
    pointer-events: none;
}

.webgui-button:hover {
    background-color: #435663;
}

.webgui-button.disabled:hover {
    background-color: #a0a0a0; /* No hover effect */
}


.status {
    display: flex;
    align-items: center;
    margin-left: auto;
    text-align: right;
}

.status span {
    display: block;
    font-size: 1.1em;
    color: white;
    margin-right: 10px;
}

.status-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.status-dot.stopped {
    background-color: red;
}

.status-dot.starting {
    background-color: orange;
}

.status-dot.running {
    background-color: green;
}

.countdown-timer {
    font-size: 0.8em;
    color: #ffcc00; /* Subtle amber color */
    margin-left: 10px; /* Align with the status dot */
}

/* Login Page Styles */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
}

.login-form {
    background-color: #3a3f44; /* Matching background color */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle drop shadow */
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-form img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.login-form input {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    font-size: 1em;
}

.login-form button {
    background-color: #4e5d6c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover {
    background-color: #435663;
}

.login-error {
    color: red;
    margin-top: 10px;
    display: none;
}
