/* --- Reset de base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.5;
}

.container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 20px;
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- Header --- */
header {
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  font-size: 2em;
  color: #00e676;
  margin-bottom: 5px;
}

header p#motd {
  font-size: 1.1em;
  color: #a5d6a7;
}

/* --- Status Section --- */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  margin-bottom: 8px;
  gap: 8px; /* espace entre l'icône et le texte */
}

.status-bar span#statusIcon {
  font-size: 1.3em;
}

.fas.fa-circle.online { color: #00e676; }
.fas.fa-circle.offline { color: #ff3d00; }

.progress-container {
  width: 100%;
  height: 20px;
  background-color: #2e2e2e;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 5px;
}

#progressBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00e676, #00bfa5);
  transition: width 0.3s ease;
}

/* --- Controls --- */
.controls {
  margin-bottom: 25px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.controls button {
  background-color: #00e676;
  color: #121212;
  border: none;
  padding: 10px 18px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.controls button:hover:not(:disabled) {
  background-color: #00bfa5;
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
}

.controls button:focus {
  outline: 2px solid #00e676;
  outline-offset: 2px;
}

.controls button:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

/* --- Info Section --- */
.server-info p {
  margin-bottom: 8px;
}

.server-info span {
  font-weight: bold;
  color: #80cbc4;
}

/* --- Console --- */
section h2 {
  margin-bottom: 10px;
  color: #00e676;
}

.console-log {
  white-space: pre-wrap;
  background-color: #000;
  color: #00ff88;
  padding: 12px;
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
}

.console input, .console select {
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  outline: none;
  background-color: #2e2e2e;
  color: #fff;
}

.console input::placeholder {
  color: #aaa;
}

.console button {
  background-color: #00e676;
  color: #121212;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 3px 5px rgba(0,0,0,0.3);
}

.console button:hover:not(:disabled) {
  background-color: #00bfa5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.console button:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

/* --- Player Lists --- */
.playerlists .list-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

#playerListContentsList, #playerListContents {
  list-style: none;
  padding-left: 0;
  max-height: 150px;
  overflow-y: auto;
  margin-top: 8px;
}

#playerListContentsList li, #playerListContents li {
  padding: 6px 10px;
  background-color: #2e2e2e;
  margin-bottom: 5px;
  border-radius: 6px;
}

.playerlists select, .console select {
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  outline: none;
  background-color: #2e2e2e;
  color: #fff;
  cursor: pointer;
}

.playerlists button, .console button {
  background-color: #00e676;
  color: #121212;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 3px 5px rgba(0,0,0,0.3);
}

.playerlists button:hover:not(:disabled), .console button:hover:not(:disabled) {
  background-color: #00bfa5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.playerlists button:disabled, .console button:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

/* --- Notifications --- */
.notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.notification {
  background-color: #333;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.notification.info { background-color: #2196f3; }
.notification.online { background-color: #00e676; color: #121212; }
.notification.offline { background-color: #ff3d00; color: #fff; }

/* Animation pour les notifications */
.notification.show {
  transform: translateX(0);
}
.notification.hide {
  transform: translateX(100%);
  opacity: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .controls, .playerlists .list-controls {
    flex-direction: column;
  }

  input, select, button {
    width: 100%;
  }
}

/* --- Curseur sur tous les boutons --- */
button {
  cursor: pointer;
}

/* --- Tableau playerlists --- */
#playerListTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#playerListTable th, #playerListTable td {
  border: 1px solid #444;
  padding: 8px 12px;
  text-align: left;
}

#playerListTable th {
  background-color: #222;
  color: #00e676;
}

#playerListTable tbody tr:nth-child(even) {
  background-color: #2e2e2e;
}

#playerListTable tbody tr:nth-child(odd) {
  background-color: #1e1e1e;
}
