body {
  font-family: Arial, Helvetica, sans-serif;
  background: url("/static/background.jpeg") no-repeat center center fixed;
  background-size: cover;
  color: #ffffff;
  background-color: #181a1b;
  margin: 0;
  padding: 0;
}

main {
  padding: 20px;
}

/* Login form styles */
form {
  margin: 0;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 200px);
}

.login-form {
  background-color: #181a1b;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-form h2 {
  margin-bottom: 20px;
  color: #ffffff;
  text-align: center;
}

.form-group label {
  display: block;
  color: #ffffff;
}

.form-input {
  width: 95%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #181a1bc4;
  color: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #4caf50;
}

.form-actions {
  text-align: center;
  padding-top: 10px;
}

.login-logo {
  display: block;
  margin: 0 auto 20px auto;
  max-width: 150px;
}

.btn {
  background-color: #4caf50;
  color: #ffffff;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.btn:hover {
  background-color: #45a049;
}

.btn:focus {
  outline: none;
}

/* Styles for the card container */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

/* Styles for individual cards */
.card {
  background-color: #1e1e1e;
  color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.card h2 {
  margin-bottom: 10px;
  margin-top: 10px;
  font-size: 1.5rem;
}

.card p {
  font-size: 1rem;
  color: #d1d5db;
}

/* Styling for the modern top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1f1f1f;
  padding: 10px 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar-logo {
  height: 40px;
  cursor: pointer;
}

/* Logout button styling */
.logout-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #c0392b;
}

.logout-btn:focus {
  outline: none;
}

/* Status card styling */
.status-card {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 8px;
}

/* Status-specific colors */
.status-card.online {
  background-color: #155724;
  color: #d4edda;
}

.status-card.offline {
  background-color: #721c24;
  color: #f8d7da;
}

.status-card.unknown {
  background-color: #707070;
  color: #dfdfdf;
}

/* Server Infos section */
#server-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

#status {
  padding: 3px;
  border-radius: 5px;
}

/* Individual info rows */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Labels */
.label {
  font-size: 0.8rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Values */
.value {
  font-size: 1rem;
  font-weight: 500;
  color: #f9fafb;
  text-align: right;
}

/* Player separator */
.separator {
  margin: 0 6px;
  color: #6b7280;
}

.server-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 20px;
  align-items: start;
  max-width: 900px;
}

.error-message {
  color: red;
  text-align: center;
  margin-bottom: 20px;
}

#actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.refresh-button {
  width: 70%;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Styling for collapsible buttons */
.collapsible {
  background-color: #1f1f1f;
  color: #e0e0e0;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: 1px solid #333;
  text-align: left;
  outline: none;
  font-size: 16px;
  margin-bottom: 5px;
  border-radius: 5px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.arrow {
  float: right;
  transition: transform 0.3s ease;
}

.arrow.open {
  transform: rotate(90deg);
}

.collapsible:hover {
  background-color: #333;
  color: #ffffff;
}

/* Styling for the collapsible content */
.content {
  padding: 15px;
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Modern grid layout for permissions */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

/* Styling for form elements inside collapsible content */
.form-group {
  display: flex;
  align-items: center;
  background-color: #2c2c2c;
  border: 1px solid #444;
  border-radius: 5px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition:
    box-shadow 0.3s ease,
    background-color 0.3s ease;
}

.form-group-login {
  display: flex;
  align-items: center;
  border-radius: 5px;
  padding: 10px;
}

.form-group:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
  background-color: #3a3a3a;
}

.form-group input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-group input[type="checkbox"]:checked {
  accent-color: #00a70e;
}

.form-group label {
  font-size: 14px;
  color: #e0e0e0;
  cursor: pointer;
}

/* Optional styling for the button */
.add-user-btn {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 15px;
}

.add-user-btn:hover {
  background-color: #0056b3;
}

/* Modal container styling */
.custom-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Darker background for better focus */
  backdrop-filter: blur(5px); /* Adds a subtle blur effect */
}

/* Modal content styling */
.custom-modal .modal-content {
  background-color: #1f1f1f; /* Dark background for the modal */
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Stronger shadow for depth */
  color: #ffffff;
  text-align: center;
  animation: fadeIn 0.3s ease-in-out; /* Smooth fade-in animation */
}

/* Close button styling */
.custom-modal .close-button {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.custom-modal .close-button:hover {
  color: #ff4c4c; /* Red hover effect for the close button */
}

/* Modal heading */
.custom-modal h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #4caf50; /* Green accent color */
}

/* Form table styling */
.custom-modal .form-table {
  width: 100%;
  margin: 0 auto;
}

.custom-modal .form-table td {
  padding: 10px;
  vertical-align: middle;
}

.custom-modal .form-table label {
  font-size: 1rem;
  color: #d1d5db; /* Light gray for labels */
}

.custom-modal .form-table input {
  width: 100%;
  padding: 10px;
  border: 1px solid #333;
  border-radius: 6px;
  background-color: #2c2c2c;
  color: #ffffff;
  font-size: 1rem;
}

.custom-modal .form-table input:focus {
  outline: none;
  border-color: #4caf50; /* Green focus border */
}

/* Submit button styling */
.custom-modal .add-user-btn {
  background-color: #4caf50;
  color: #ffffff;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.custom-modal .add-user-btn:hover {
  background-color: #45a049; /* Slightly darker green on hover */
}

.amount-section {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.amount-section h2 {
  margin-bottom: 25px;
  font-size: 1.5rem;
  color: #ffffff;
}

.amount-section span {
  background-color: #ffeb3b;
  padding: 5px 10px;
  border-radius: 4px;
  margin-left: 10px;
  font-weight: bold;
}

.amount-section form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.amount-section form label {
  font-size: 1rem;
  color: #d1d5db;
}

.amount-section form input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  width: 150px;
}

.amount-section form button {
  padding: 8px 15px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .login-form {
    max-width: 80%;
  }
  .server-layout {
    grid-template-columns: 1fr;
  }

  .logout-section,
  .admin-section {
    position: static;
    margin: 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    max-width: 50%;
  }

  .button-container {
    display: flex;
    justify-content: space-between;
    max-width: 420px;
    width: 100%;
  }

  .btn.admin,
  .btn.logout {
    width: 98%;
  }

  .refresh-button {
    width: 100%;
  }

  #actions {
    max-width: 420px;
  }

  .admin-table {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    margin: none;
    background: none;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 10px;
    background-color: #181a1b;
  }

  .admin-table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border: none;
  }

  .admin-table tbody tr td::before {
    content: attr(data-label);
    flex: 1;
    font-weight: bold;
    color: #ffffff;
    padding-right: 10px; /* Add padding between label and input/button */
  }

  .admin-table tbody tr td input,
  .admin-table tbody tr td select,
  .admin-table tbody tr td button {
    flex: 2;
    width: 100%; /* Ensure all input fields have the same width */
  }

  .admin-table tbody tr td button {
    margin-top: 5px; /* Add spacing between buttons */
  }

  #charts-container {
    /*height: auto; /* Allow scrolling on very small screens */
    padding: 10px;
  }

  canvas {
    max-height: 40%; /* Adjust chart height for smaller screens */
  }
}

#charts-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  height: 82vh; /* Full viewport height */
  margin: 0;
  padding: 0;
}

.cancel-link {
  color: #4caf50;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid #4a4c4e;
  padding: 8px;
  text-align: left;
}

th {
  background: #1e1f22;
}

/* Restarting page styles */
.loading-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.loading-animation div {
  width: 40px;
  height: 40px;
  border: 4px solid #ffffff;
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Restart processing styles */
.output {
  background-color: #2a2c2e;
  color: #ffffff;
  padding: 10px;
  border-radius: 4px;
  white-space: pre-wrap;
  font-family: monospace;
}

.return-link {
  color: #4caf50;
  text-decoration: none;
}

.return-message {
  text-align: center;
}

.restarting-message {
  text-align: center;
  color: #ffffff;
}

/* Restart confirmation styles */
.restart-message {
  text-align: center;
  color: #ffffff;
}