/* ==========================================================
   Pizza-Doom - Servers list page
   File: /var/www/html/servers/serverstyle.css
   ========================================================== */

:root {
  --header-h: 0px;

  --bg-dark: #070a0f;
  --blue: #004dff;
  --green: #33cc33;

  --card-border: rgba(255, 255, 255, 0.55);
  --card-radius: 12px;

  --shadow:
    0 18px 45px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  background: var(--bg-dark);
}

html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;

  background-image: url("/assets/background.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;

  filter: blur(4px) saturate(1.15) brightness(0.72);
  transform: scale(1.08);
}

html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    radial-gradient(circle at center top, rgba(255, 95, 20, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.76));
}

body {
  margin: 0;
  padding-top: var(--header-h);

  min-height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: transparent;
}

img,
svg,
iframe {
  max-width: 100%;
}

main.page {
  width: 100%;
  flex: 1 0 auto;
  padding: 74px 0 56px;
}

/* ==========================================================
   Main container
   ========================================================== */

.container {
  width: min(1360px, calc(100% - 40px));
  max-width: 1360px;

  margin: 0 auto 28px;
  padding: 30px 34px;

  background:
    linear-gradient(180deg, rgba(24, 24, 24, 0.94), rgba(13, 13, 13, 0.92));

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--card-radius);

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  color: #e5e7eb;
  backdrop-filter: blur(8px);
}

.content {
  text-align: left;
}

.title {
  margin: 0 0 10px;

  color: var(--green);
  text-align: center;
  font-size: 1.95rem;
  line-height: 1.15;

  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.page-subtitle {
  color: #cbd5e1;
  text-align: center;
  margin: 7px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.container a {
  color: #93c5fd;
}

.container a:hover {
  color: #bfdbfe;
}

/* ==========================================================
   System stats
   ========================================================== */

.stats-box.system {
  width: min(520px, 100%);

  margin: 22px auto 24px;
  padding: 16px 18px;

  background:
    linear-gradient(180deg, rgba(35, 20, 0, 0.90), rgba(18, 12, 0, 0.86));

  color: #eee;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 5px solid #f59e0b;
  border-radius: 12px;

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.stats-box.system h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.15rem;
}

.stats-box.system p {
  margin: 5px 0;
  color: #e5e7eb;
}

/* ==========================================================
   Top highlights
   ========================================================== */

#active-server-box,
#favorite-servers {
  margin-bottom: 20px;
}

#favorite-servers h2 {
  margin: 0 0 12px;
  color: #facc15;
  font-size: 1.35rem;
}

.active-server-highlight.multi-server,
.active-server-highlight.last {
  padding: 14px 16px;

  background:
    linear-gradient(180deg, rgba(255, 248, 218, 0.98), rgba(255, 242, 190, 0.96));

  color: #333;

  border: 1px solid rgba(245, 158, 11, 0.55);
  border-left: 5px solid #f59e0b;
  border-radius: 10px;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 0.98rem;
}

.active-server-highlight.last {
  border-color: rgba(148, 163, 184, 0.55);
  border-left-color: #64748b;
}

.active-server-highlight .server-line {
  padding: 6px 0;
  border-top: 1px solid rgba(245, 158, 11, 0.35);
}

.active-server-highlight .server-line:first-child {
  border-top: 0;
}

/* ==========================================================
   Toggle buttons
   ========================================================== */

.toggle-button {
  width: min(420px, 100%);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin: 14px 0 12px;
  padding: 13px 16px;

  background:
    linear-gradient(180deg, #3a3a3a, #1f1f1f);

  color: #fff;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;

  font-size: 1rem;
  font-weight: 800;
  text-align: left;

  cursor: pointer;

  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  transition: filter 0.15s ease, transform 0.02s ease;
}

.toggle-button:hover {
  filter: brightness(1.15);
}

.toggle-button:active {
  transform: translateY(1px);
}

.toggle-button:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 69, 0, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.pulse-dot {
  display: inline-block;

  width: 10px;
  height: 10px;
  margin-left: 8px;

  background: #22c55e;
  border-radius: 50%;

  box-shadow: 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse 1.5s infinite;
  vertical-align: middle;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.75;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65);
  }

  70% {
    transform: scale(1.18);
    opacity: 1;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(0.9);
    opacity: 0.75;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.server-section {
  margin-bottom: 22px;
}

/* ==========================================================
   Server cards
   ========================================================== */

.server-item {
  position: relative;

  margin: 0 0 14px;
  padding: 17px 18px 16px 56px;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 238, 238, 0.96));

  color: #222;

  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);

  text-align: left;
  cursor: pointer;

  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.server-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 177, 74, 0.55);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.server-item h3 {
  margin: 0 0 9px;

  color: #111827;
  font-size: 1.24rem;
  line-height: 1.25;

  overflow-wrap: anywhere;
}

.server-item p {
  margin: 0 0 7px;

  color: #4b5563;
  line-height: 1.4;

  overflow-wrap: anywhere;
}

.server-item b {
  color: #1f2937;
}

.server-item i {
  color: #555;
}

.server-item a {
  color: #0b5ed7;
}

.server-item a:hover {
  text-decoration: underline;
}

.favorite-highlight {
  border-color: rgba(250, 204, 21, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 251, 230, 0.99), rgba(255, 246, 196, 0.97));
}

.favorite-star {
  position: absolute;
  left: 17px;
  top: 15px;

  font-size: 29px;
  line-height: 1;

  color: #facc15;
  cursor: pointer;

  text-shadow:
    0 0 8px rgba(255, 251, 230, 0.9),
    0 0 18px rgba(250, 204, 21, 0.75),
    1px 1px 3px rgba(0, 0, 0, 0.35);

  transition: transform 0.18s ease, color 0.2s ease;
}

.favorite-star.not-fav {
  color: #b7b7b7;
  text-shadow: none;
}

.favorite-star:hover {
  transform: scale(1.22) rotate(-8deg);
  color: #fde047;
}

.last-active-list {
  margin-top: 8px !important;

  color: #55735c !important;
  font-style: italic;
  font-size: 0.9rem;
}

.active-now {
  display: inline-block;

  margin: 7px 0 2px;
  padding: 4px 12px;

  color: #15803d;
  background: rgba(220, 252, 231, 0.95);

  border: 1px solid rgba(34, 197, 94, 0.35);
  border-left: 4px solid #22c55e;
  border-radius: 999px;

  font-weight: 900;
  font-size: 0.95rem;

  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.18);
}

/* ==========================================================
   Buttons used inside server cards
   ========================================================== */

.btn-group {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.btn {
  padding: 5px 10px;

  background: #222;
  color: #eee;

  border: 1px solid #444;
  border-radius: 7px;

  font-size: 0.9rem;
  font-weight: 700;

  cursor: pointer;
}

.btn:hover {
  background: #333;
}

.join-btn {
  border-color: #2e7d32;
}

.join-btn:hover {
  background: #2e7d32;
}

.copy-ip {
  border-color: #1976d2;
}

.copy-ip:hover {
  background: #1976d2;
}

/* ==========================================================
   Footer
   ========================================================== */

footer,
.site-footer {
  margin-top: auto;

  width: 100%;

  background-color: #222;
  color: #fff;

  padding: 14px 0;

  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  line-height: 1.4;

  border-top: 1px solid #444;
}

footer p,
.site-footer p {
  margin: 0;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 900px) {
  main.page {
    padding: 34px 0 42px;
  }

  .container {
    width: calc(100% - 24px);
    padding: 22px 18px;
  }

  .title {
    font-size: 1.65rem;
  }

  .toggle-button {
    width: 100%;
  }

  .server-item {
    padding: 16px 15px 15px 52px;
  }

  .favorite-star {
    left: 15px;
    top: 15px;
    font-size: 27px;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 18px);
    padding: 18px 14px;
  }

  .page-subtitle {
    font-size: 0.95rem;
  }

  .server-item {
    padding-left: 48px;
  }

  .server-item h3 {
    font-size: 1.08rem;
  }

  .server-item p {
    font-size: 0.94rem;
  }

  .stats-box.system {
    font-size: 0.9rem;
  }
}

/* Engine badges in server list */
.engine-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 3px 9px;
  border-radius: 999px;

  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;

  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.engine-zan {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
}

.engine-qzan {
  background: linear-gradient(180deg, #7c3aed, #5b21b6);
}

.version-text {
  color: #6b7280;
  font-size: 0.9rem;
  font-style: italic;
  margin-left: 6px;
}

.q-zandronum-server {
  border-left: 5px solid #7c3aed;
}

.zandronum-server {
  border-left: 5px solid #2563eb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin: 22px auto 24px;
}

.stats-box.system {
  width: 100%;
  margin: 0;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}