/* ==========================================================
   Pizza-Doom - Banlist page
   File: /var/www/html/banlist/styles.css
   ========================================================== */

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

  --bg-dark: #070a0f;
  --card-bg: rgba(247, 247, 247, 0.96);
  --card-border: rgba(255, 255, 255, 0.55);
  --card-radius: 12px;

  --blue: #004dff;
  --link: #007acc;
  --link-hover: #33b5ff;

  --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);
}

/* Background sfocato coerente con la home */
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);
}

/* Overlay scuro */
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 {
  max-width: 100%;
  height: auto;
}

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

/* ==========================================================
   Main card
   ========================================================== */

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

  margin: 0 auto 24px;
  padding: 28px 32px;

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

  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);

  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.container h1,
.container h2 {
  color: var(--blue);
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  padding-bottom: 8px;
  margin: 0 0 16px;
}

.container h1 {
  font-size: 1.9rem;
}

.container h2 {
  font-size: 1.45rem;
}

.container p {
  line-height: 1.45;
}

.container a {
  color: var(--link);
  font-weight: bold;
  text-decoration: underline;
}

.container a:hover {
  color: var(--link-hover);
}

/* ==========================================================
   Banlist sections
   ========================================================== */

.banlist-section {
  margin: 22px 0 28px;
}

.banlist-section:last-child {
  margin-bottom: 0;
}

.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-width: 230px;
  margin: 0 8px 12px 0;
  padding: 12px 18px;

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

  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;

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

  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 6px 16px rgba(0, 0, 0, 0.22);
}

/* Testo riepilogo: Total bans / Empty / error */
#banlistTotal,
#ukBanlistTotal {
  margin: 10px 0 14px;
  padding: 10px 12px;

  background: rgba(0, 0, 0, 0.055);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;

  color: #333;
  font-size: 0.95rem;
}

.empty-banlist {
  color: #b91c1c !important;
  font-style: italic;
  text-align: center;
}

/* ==========================================================
   Tables
   ========================================================== */

.table-scroll {
  width: 100%;
  max-height: 62vh;

  overflow: auto;
  -webkit-overflow-scrolling: touch;

  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

.table-scroll:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(0, 77, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.10);
}

.banlist-table,
.table-scroll table {
  width: 100%;
  min-width: 760px;

  border-collapse: separate;
  border-spacing: 0;

  margin: 0;
  font-size: 0.95rem;
}

.banlist-table th,
.banlist-table td,
.table-scroll table th,
.table-scroll table td {
  padding: 12px 14px;

  border-right: 1px solid rgba(0, 0, 0, 0.10);
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);

  text-align: left;
  vertical-align: top;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.banlist-table th:last-child,
.banlist-table td:last-child,
.table-scroll table th:last-child,
.table-scroll table td:last-child {
  border-right: 0;
}

.banlist-table thead th,
.table-scroll table thead th {
  position: sticky;
  top: 0;
  z-index: 2;

  background:
    linear-gradient(180deg, #2f2f2f, #202020);

  color: #fff;
  font-weight: 800;
}

.banlist-table tbody tr,
.table-scroll table tbody tr {
  background: rgba(255, 255, 255, 0.88);
}

.banlist-table tbody tr:nth-child(even),
.table-scroll table tbody tr:nth-child(even) {
  background: rgba(240, 240, 240, 0.92);
}

.banlist-table tbody tr:hover,
.table-scroll table tbody tr:hover {
  background: rgba(255, 245, 220, 0.96);
}

/* Colonne */
.banlist-table th:nth-child(1),
.banlist-table td:nth-child(1),
.table-scroll table th:nth-child(1),
.table-scroll table td:nth-child(1) {
  width: 220px;
  font-family: Consolas, "Courier New", monospace;
}

.banlist-table th:nth-child(2),
.banlist-table td:nth-child(2),
.table-scroll table th:nth-child(2),
.table-scroll table td:nth-child(2) {
  width: 210px;
}

.banlist-table th:nth-child(3),
.banlist-table td:nth-child(3),
.table-scroll table th:nth-child(3),
.table-scroll table td:nth-child(3) {
  width: auto;
}

.permanent {
  color: #777;
  font-weight: 700;
}

/* Scrollbar */
.table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.40);
}

/* ==========================================================
   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) {
  .page {
    padding: 28px 0 40px;
  }

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

  .container h1 {
    font-size: 1.65rem;
  }

  .container h2 {
    font-size: 1.3rem;
  }

  .toggle-button {
    width: 100%;
    min-width: 0;
  }

  .table-scroll {
    max-height: 70vh;
  }

  .banlist-table,
  .table-scroll table {
    min-width: 660px;
  }
}

@media (max-width: 520px) {
  .page {
    padding-top: 20px;
  }

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

  .banlist-table,
  .table-scroll table {
    min-width: 600px;
    font-size: 0.9rem;
  }

  .banlist-table th,
  .banlist-table td,
  .table-scroll table th,
  .table-scroll table td {
    padding: 10px 11px;
  }

  #banlistTotal,
  #ukBanlistTotal {
    font-size: 0.9rem;
  }
}