* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0d0d0d;
  color: white;
  font-family: Arial;
}

/* ---------------- TOPBAR ---------------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #111;
  border-bottom: 3px solid #ffd000;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #ffd000;
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #ffd000;
}

.user span {
  color: #ffd000;
  font-weight: bold;
}

/* ---------------- LAYOUT ---------------- */

.container {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: #1a1a1a;
  border: 2px solid #2d2d2d;
  border-radius: 20px;
  padding: 30px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #ffd000;
}

.card h1 {
  margin-top: 0;
  color: #ffd000;
}

.card h2 {
  margin-top: 0;
  color: #ffd000;
}

.subtitle {
  color: #888;
  margin-top: -10px;
  margin-bottom: 24px;
}

/* ---------------- SERVER BOX ---------------- */

.server-box {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.server-box h3 {
  margin: 0 0 6px 0;
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.server-name {
  color: #ffd000;
  font-size: 18px;
  font-weight: bold;
}

/* ---------------- FORM ---------------- */

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  color: #ccc;
  font-size: 14px;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #333;
  background: #111;
  color: white;
  font-size: 14px;
  appearance: none;
  outline: none;
  transition: border 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: #ffd000;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-row select {
  flex: 1;
}

.time-row span {
  color: #ffd000;
  font-size: 20px;
  font-weight: bold;
}

.slider-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  flex: 1;
  accent-color: #ffd000;
  background: transparent;
  border: none;
  padding: 0;
}

#legendaryValue {
  color: #ffd000;
  font-weight: bold;
  min-width: 60px;
  text-align: right;
}

/* ---------------- TOGGLE ---------------- */

.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 16px;
  cursor: pointer;
}

.toggle-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-size: 15px;
  color: white;
  font-weight: bold;
}

.toggle-sub {
  font-size: 12px;
  color: #888;
}

.toggle-right {
  display: flex;
  align-items: center;
}

.toggle-right input[type="checkbox"] {
  display: none;
}

.toggle-switch {
  width: 48px;
  height: 26px;
  background: #333;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  display: block;
  margin: 0;
  border: none;
  padding: 0;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-right input:checked + .toggle-switch {
  background: #ffd000;
}

.toggle-right input:checked + .toggle-switch::after {
  transform: translateX(22px);
}

/* ---------------- BUTTONS ---------------- */

button,
.btn {
  background: #ffd000;
  color: #000;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

button:hover,
.btn:hover {
  background: #ffe033;
  transform: translateY(-2px);
}

button:active,
.btn:active {
  transform: translateY(0);
}

button[type="submit"] {
  width: 100%;
  margin-top: 24px;
  font-size: 16px;
  padding: 14px;
  letter-spacing: 0.5px;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.button-row form {
  flex: 1;
}

.button-row form button {
  width: 100%;
}

.start-btn {
  background: #ffd000;
  color: #000;
}

.start-btn:hover {
  background: #ffe033;
}

.stop-btn {
  background: #111;
  color: #ffd000;
  border: 2px solid #ffd000;
}

.stop-btn:hover {
  background: #1f1f1f;
}

/* ---------------- BACK BUTTON ---------------- */

.back-btn {
  display: inline-block;
  margin-bottom: 20px;
  color: #888;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.back-btn:hover {
  color: #ffd000;
}

/* ---------------- STATS ---------------- */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.stat-card {
  background: #111;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: border 0.2s;
}

.stat-card:hover {
  border-color: #ffd000;
}

.stat-card h3 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #888;
}

.stat-card p {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: #ffd000;
}

.stat-card.full-width {
  grid-column: 1 / -1;
}

/* ---------------- LIVE STATS ---------------- */

.live-stats {
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.live-stats-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.live-stats-toggle:hover {
  background: #222;
}

.live-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.live-chevron {
  font-size: 13px;
  color: #aaa;
  transition: transform 0.2s ease;
  display: inline-block;
}

.live-chevron.closed {
  transform: rotate(-90deg);
}

.live-body {
  padding: 1rem;
}
/* ---------------- SERVERS PAGE ---------------- */

.page-title {
  color: #ffd000;
  font-size: 28px;
  margin-bottom: 4px;
}

.page-subtitle {
  color: #888;
  margin-top: 0;
  margin-bottom: 28px;
}

.servers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.server-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #1a1a1a;
  border: 2px solid #2d2d2d;
  border-radius: 16px;
  padding: 16px 20px;
  text-decoration: none;
  color: white;
  transition: border-color 0.2s, transform 0.15s;
}

.server-card:hover {
  border-color: #ffd000;
  transform: translateY(-2px);
}

.server-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #333;
  object-fit: cover;
}

.server-icon-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #333;
  background: #2d2d2d;
  color: #ffd000;
  font-size: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.server-info {
  flex: 1;
}

.server-card-name {
  font-size: 16px;
  font-weight: bold;
  color: white;
}

.server-card-sub {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

.server-arrow {
  color: #ffd000;
  font-size: 20px;
  font-weight: bold;
}

/* ---------------- MISC ---------------- */

.green {
  background: #00d26a;
  color: #000;
}

.red {
  background: #ff4040;
  color: white;
}

.online {
  background: #123d22;
  color: #5cff9d;
}

.offline {
  background: #441616;
  color: #ff7373;
}