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: 25px;
}

form {
  margin: 0;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 50px);
}

.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 {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  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;
}

.btn {
  background-color: #4caf50;
  color: #ffffff;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

#add-amount{
  padding: 5px;
  width: 60px
}

.btn.logout,
.btn.admin {
  background-color: #303435;
}

.btn.logout:hover,
.btn.admin:hover {
  background-color: #454a4e;
}

.btn:hover {
  background-color: #45a049;
}

.btn:focus {
  outline: none;
}

.error-message {
  color: red;
  text-align: center;
  margin-bottom: 20px;
}

/* Container below the header */
#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;
}

#actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.logout-section {
  position: absolute;
  top: 20px;
  right: 20px;
}

.admin-section {
  position: absolute;
  top: 20px;
  right: 110px;
}

.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);
}

.load-mods-button {
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* 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 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);
  }
}

.restarting-message {
  text-align: center;
  color: #ffffff;
}

/* Restart confirmation styles */
.restart-message {
  text-align: center;
  color: #ffffff;
}

.cancel-link {
  color: #4caf50;
  text-decoration: none;
}

#bar {
  width: 100%;
  background: #eee;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
}

#fill {
  height: 100%;
  width: 0;
  background: #4caf50;
  transition: width 0.2s;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid #4a4c4e;
  padding: 8px;
  text-align: left;
}

th {
  background: #1e1f22;
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(14px);
}

.admin-table {
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 1rem;
  text-align: left;
  background-color: #181a1b;
  color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.admin-table thead {
  background-color: #4caf50;
  color: #ffffff;
  font-weight: bold;
}

.admin-table th {
  padding: 12px 15px;
}

.admin-table td {
  padding: 12px 15px;
}

.admin-table tbody tr:nth-child(even) {
  background-color: #181a1bc4;
}

.edit-btn,
.save-btn,
.cancel-btn,
.add-user-btn,
.delete-btn {
  background-color: #1e1f22;
  color: #ffffff;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  width: auto;
}

.save-btn {
  background-color: #4caf50;
}

.cancel-btn,
.delete-btn {
  background-color: #f44336;
  margin-left: 8px;
}

.edit-btn:hover,
.save-btn:hover,
.cancel-btn:hover,
.add-user-btn:hover {
  background-color: #333538;
}

.save-btn:hover {
  background-color: #45a049;
}

.cancel-btn:hover,
.delete-btn:hover {
  background-color: #d32f2f;
  margin-left: 8px;
}

.edit-btn:focus,
.save-btn:focus,
.cancel-btn:focus {
  outline: none;
}

.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4caf50;
  color: white;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 1000;
}

.notification.error {
  background-color: #f44336;
}

#charts-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  height: 90vh; /* Full viewport height */
  margin: 0;
  padding: 0;
}

canvas {
  flex: 1;
  max-height: 45%; /* Ensure both charts fit within the screen */
  width: 95%; /* Adjust width for smaller screens */
}

@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 */
  }
}
