@charset "UTF-8";

/* ==========================================================
   Pizza-Doom - WADs page
   File: /var/www/html/wadsstyle.css
   ========================================================== */

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

  --bg-dark: #070a0f;
  --blue: #004dff;
  --link: #007acc;
  --link-hover: #33b5ff;

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

/* Sfondo coerente con home/banlist/rules */
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 {
  max-width: 100%;
  height: auto;
}

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

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

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

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

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

.content {
  width: 100%;
}

.content h1 {
  margin: 0 0 18px;
  padding-bottom: 10px;

  color: var(--blue);
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);

  font-size: 1.9rem;
  line-height: 1.15;
}

.wad-page-title {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.wad-title-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 10px;

  background: #166534;
  color: #fff;
  border: 1px solid #22c55e;
  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}

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

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

/* ==========================================================
   Mirror notice
   ========================================================== */

.mirror-notice {
  margin: 0 0 22px;
  padding: 15px 16px;

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

  color: #f8fafc;

  border-left: 5px solid #f59e0b;
  border-radius: 10px;

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  line-height: 1.45;
}

.mirror-notice strong {
  color: #fff;
}

.mirror-notice a {
  color: #facc15;
}

/* ==========================================================
   Search toolbar
   ========================================================== */

.wad-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;

  margin: 0 0 18px;
}

#wad-search {
  flex: 1 1 auto;
  min-width: 0;

  padding: 12px 14px;

  background: #fff;
  color: #222;

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

  font-size: 1rem;
  outline: none;

  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

#wad-search:focus {
  border-color: rgba(0, 77, 255, 0.45);
  box-shadow:
    0 0 0 3px rgba(0, 77, 255, 0.14),
    inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

#wad-clear {
  flex: 0 0 auto;

  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

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

  color: #fff;

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

  font-size: 1.05rem;
  font-weight: 800;

  cursor: pointer;

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

#wad-clear:hover {
  filter: brightness(1.15);
}

#wad-clear:active {
  transform: translateY(1px);
}

/* ==========================================================
   WAD list
   ========================================================== */

.wad-scroll {
  width: 100%;
  max-height: 68vh;

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

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

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

.wad-scroll:focus-within {
  box-shadow:
    0 0 0 3px rgba(0, 77, 255, 0.14),
    0 8px 20px rgba(0, 0, 0, 0.10);
}

.wad-head,
.wad-row {
  display: grid;
  grid-template-columns:
    minmax(480px, 1fr)
    minmax(150px, 170px)
    minmax(210px, 230px)
    minmax(140px, 160px);

  align-items: center;
  min-width: 1040px;
}

.wad-head {
  position: sticky;
  top: 0;
  z-index: 5;

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

  color: #fff;
  font-weight: 900;

  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.wad-head span {
  padding: 13px 14px;

  color: #ffffff;
  opacity: 1;

  border-right: 1px solid rgba(255, 255, 255, 0.14);
  user-select: none;

  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.wad-head span:last-child {
  border-right: 0;
}

.wad-head span.sorted::after {
  content: " \2191";
  opacity: 0.85;
}

.wad-head span.sorted.desc::after {
  content: " \2193";
  opacity: 0.85;
}

.wad-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wad-row {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

.wad-row:nth-child(even) {
  background: rgba(240, 240, 240, 0.92);
}

.wad-row:hover {
  background: rgba(255, 245, 220, 0.96);
}

.wad-row > span {
  min-width: 0;
  padding: 12px 14px;

  color: #2b2b2b;
  border-right: 1px solid rgba(0, 0, 0, 0.08);

  overflow-wrap: anywhere;
  word-break: break-word;
}

.wad-row > span:last-child {
  border-right: 0;
}

.file-name a {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  max-width: 100%;

  color: #005bb5;
  font-weight: 800;
  text-decoration: none;
}

.file-name a:hover {
  color: #008cff;
  text-decoration: underline;
}

.file-size,
.file-modified,
.file-downloads {
  color: #333;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.file-downloads {
  font-weight: 900;
  color: #111;
}

/* Badge estensioni */
.file-badge {
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 46px;
  padding: 4px 7px;

  border-radius: 999px;

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

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

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

.badge-pk3 {
  background: linear-gradient(180deg, #16a34a, #15803d);
}

.badge-pk7 {
  background: linear-gradient(180deg, #9333ea, #7e22ce);
}

.badge-zip {
  background: linear-gradient(180deg, #ea580c, #c2410c);
}

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

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

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

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

/* ==========================================================
   Stats footer
   ========================================================== */

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

  margin: 0 auto 34px;
  padding: 18px 22px;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;

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

.stats-footer p {
  margin: 0;
  padding: 11px 12px;

  background: rgba(0, 0, 0, 0.045);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 9px;

  color: #333;
  font-weight: 700;
  text-align: center;
}

.stats-footer p:last-child {
  grid-column: 1 / -1;
  font-weight: 500;
  font-size: 0.92rem;
}

/* ==========================================================
   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: 1000px) {
  .wad-head,
  .wad-row {
    grid-template-columns:
      minmax(340px, 1fr)
      130px
      180px
      120px;

    min-width: 770px;
  }

  .stats-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

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

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

  .stats-footer {
    width: calc(100% - 24px);
  }
}

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

  .wad-toolbar {
    gap: 8px;
  }

  #wad-search {
    font-size: 0.95rem;
    padding: 11px 12px;
  }

  #wad-clear {
    width: 42px;
    height: 42px;
  }

.wad-head,
.wad-row {
  grid-template-columns:
    minmax(270px, 1fr)
    110px
    155px
    105px;

  min-width: 640px;
  font-size: 0.9rem;
}

  .wad-head span,
  .wad-row > span {
    padding: 10px 11px;
  }

  .stats-footer {
    width: calc(100% - 18px);
    grid-template-columns: 1fr;
    padding: 16px 14px;
  }

  .mirror-notice {
    padding: 14px;
  }
}


/* ==========================================================
   PD_PUBLIC_WAD_NODE_MIRRORS_V1
   ========================================================== */

.wad-node-overview {
  margin: 18px 0 20px;
  padding: 17px;

  background:
    linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.08),
      rgba(15, 23, 42, 0.035)
    );

  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
}

.wad-current-list {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin-bottom: 17px;
  padding-bottom: 15px;

  border-bottom: 1px solid rgba(15, 23, 42, 0.13);
}

.wad-current-list strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.05rem;
  color: #111827;
}

.wad-current-list p {
  margin: 0;
  color: #374151;
  line-height: 1.5;
}

.wad-node-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;
  min-width: 42px;
  padding: 5px 10px;

  color: #fff;
  border-radius: 999px;

  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.wad-node-it {
  background: #166534;
  border: 1px solid #22c55e;
}

.wad-node-uk {
  background: #1e3a8a;
  border: 1px solid #60a5fa;
}

.wad-mirror-title {
  margin-bottom: 10px;

  color: #111827;
  font-size: 1rem;
  font-weight: 900;
}

.wad-mirror-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wad-mirror-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  min-width: 0;
  padding: 14px;

  background: rgba(255, 255, 255, 0.74);
  color: #111827 !important;

  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 10px;

  text-decoration: none !important;

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

.wad-mirror-card:hover {
  transform: translateY(-1px);

  border-color: rgba(249, 115, 22, 0.55);

  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.12);
}

.wad-mirror-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wad-mirror-card-body strong {
  color: #111827;
}

.wad-mirror-card-body code {
  color: #1d4ed8;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.wad-mirror-card-body small {
  color: #6b7280;
}

.wad-mirror-hint {
  margin: 13px 0 0;

  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .wad-mirror-grid {
    grid-template-columns: 1fr;
  }

  .wad-current-list {
    align-items: flex-start;
  }
}