/* Torneo tra Gilde - Giugno 2026
   Grafica semplice, responsive, facile da tradurre.
   Le scritte sono tutte in HTML. Lo sfondo e solo decorativo. */

:root {
  --blue-1: #143c77;
  --blue-2: #304ffe;
  --violet: #6200ea;
  --dark: #0b111c;
  --gold: #ffc84d;
  --gold-dark: #b67818;
  --red: #d32f2f;
  --text: #222222;
  --muted: #555555;
  --card: rgba(255, 255, 255, 0.96);
  --line: rgba(98, 0, 234, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #0b0f18 url("/tournament/image/sfondo.png") no-repeat center top fixed;
  background-size: cover;
  margin: 0;
  padding: 0;
  color: var(--text);
  text-align: center;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.15) 25%, rgba(0,0,0,.15) 75%, rgba(0,0,0,.08));
  z-index: -1;
}

header {
  background: linear-gradient(45deg, var(--violet), var(--blue-2));
  color: #fff;
  padding: 18px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: .3px;
}

header .subtitle {
  display: block;
  margin-top: 6px;
  color: #ffdd73;
  font-size: clamp(.9rem, 2vw, 1.08rem);
  font-weight: 700;
}

.container {
  width: min(1100px, calc(100% - 28px));
  margin: 34px auto;
  padding: clamp(16px, 3vw, 30px);
  background: var(--card);
  border-radius: 15px;
  box-shadow: 0 4px 22px rgba(0,0,0,0.45);
  animation: fadeIn .55s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}


.banner-section {
  margin: 0 auto 28px;
}

.banner-section img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 200, 77, 0.55);
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
  background: #0b111c;
}

.intro {
  margin-bottom: 22px;
}

.date-badge {
  display: inline-block;
  padding: 8px 16px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #0f2444;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: .4px;
  box-shadow: inset 0 0 0 1px rgba(255,200,77,.35);
}

.intro h2 {
  margin: 0 0 10px;
  color: #151515;
  font-size: clamp(1.45rem, 3.2vw, 2.35rem);
  line-height: 1.15;
}

.intro p {
  max-width: 820px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.55;
}

.badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #243b6b;
  border: 1px solid #cfd8ff;
  font-weight: 800;
  font-size: .96rem;
}

.prizes {
  margin: 24px auto 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.prize-card {
  position: relative;
  padding: 18px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f5f5f5);
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 3px 10px rgba(0,0,0,.14);
  overflow: hidden;
}

.prize-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
}

.prize-card h3 {
  margin: 6px 0 8px;
  font-size: 1.25rem;
  color: #111;
}

.prize-card strong {
  display: block;
  color: var(--red);
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1;
  margin-bottom: 8px;
}

.prize-card p {
  margin: 0;
  color: #333;
  font-weight: 700;
  line-height: 1.35;
}

.quick-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0 26px;
}

.info-box {
  padding: 15px 12px;
  border-radius: 12px;
  background: #f7f8ff;
  border: 1px solid #dbe1ff;
  box-shadow: 0 2px 7px rgba(0,0,0,.08);
}

.info-box h3 {
  margin: 0 0 8px;
  color: var(--violet);
  font-size: 1.05rem;
}

.info-box p {
  margin: 0;
  color: #333;
  line-height: 1.4;
}

.section {
  margin: 26px auto 0;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.13);
  border: 1px solid rgba(0,0,0,.08);
}

.section h2 {
  margin: 0 0 14px;
  color: var(--violet);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.format-step {
  padding: 14px 12px;
  background: #f9f9ff;
  border: 1px solid #dedcff;
  border-radius: 10px;
}

.format-step .number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--violet), var(--blue-2));
  color: #fff;
  font-weight: 800;
}

.format-step h3 {
  margin: 0 0 6px;
  color: #202020;
  font-size: 1.05rem;
}

.format-step p {
  margin: 0;
  color: #444;
  line-height: 1.42;
}

.rules ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  columns: 2;
  column-gap: 34px;
}

.rules li {
  break-inside: avoid;
  position: relative;
  padding-left: 20px;
  margin: 0 0 9px;
  color: #333;
  font-size: 1.02rem;
  line-height: 1.45;
}

.rules li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 900;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-table,
.ranking-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  margin-top: 10px;
  background: #e8eaf6;
  border-radius: 10px;
  overflow: hidden;
}

.calendar-table th,
.calendar-table td,
.ranking-table th,
.ranking-table td {
  border: 1px solid var(--line);
  padding: 11px 9px;
  text-align: center;
}

.calendar-table th,
.ranking-table th {
  background: linear-gradient(45deg, var(--violet), var(--blue-2));
  color: #fff;
  font-weight: 800;
}

.calendar-table tr:nth-child(even),
.ranking-table tr:nth-child(even) {
  background: #f4f5ff;
}

.calendar-table tr:hover,
.ranking-table tr:hover {
  background: #dcd5ff;
}

.note {
  margin: 14px 0 0;
  color: #555;
  font-size: .98rem;
}

footer {
  margin-top: 24px;
  padding: 14px 10px;
  background: linear-gradient(45deg, var(--violet), var(--blue-2));
  color: #fff;
  font-weight: 700;
}

footer p {
  margin: 0;
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .prizes,
  .quick-info,
  .format-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rules ul {
    columns: 1;
  }
}

@media (max-width: 620px) {
  header {
    padding: 15px 10px;
  }

  .container {
    width: calc(100% - 16px);
    margin: 16px auto;
    border-radius: 11px;
    padding: 14px;
  }

  .prizes,
  .quick-info,
  .format-grid {
    grid-template-columns: 1fr;
  }

  .prize-card {
    padding: 16px 12px;
  }

  .section {
    padding: 15px 12px;
  }

  .badges span {
    width: 100%;
  }
}


@media (max-width: 620px) {
  .banner-section {
    margin-bottom: 18px;
  }

  .banner-section img {
    border-radius: 8px;
  }
}

/* Calendario guerre - box gilde e risultati */
.calendar-table .group-row td {
  background: linear-gradient(45deg, #0f2444, var(--violet));
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 12px 10px;
}

.calendar-table .phase-row td {
  background: #fff7df;
  color: #4d3200;
  font-weight: 900;
}

.match-guilds {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.guild-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid #cfd8ff;
  background: #ffffff;
  color: #202020;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.guild-box.winner {
  background: #e6f4ea;
  border-color: #2e7d32;
  color: #1b5e20;
}

.guild-box.loser {
  background: #fde8e8;
  border-color: #c62828;
  color: #8b1a1a;
}

.vs-label {
  color: var(--violet);
  font-weight: 900;
  padding: 0 2px;
}

.result-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d8dcff;
  color: #222;
  font-weight: 900;
}

.result-box.pending {
  color: #666;
  background: #f7f8ff;
}

.calendar-note {
  max-width: 880px;
  margin: 14px auto 0;
  line-height: 1.45;
  color: #444;
  font-size: .98rem;
}

@media (max-width: 620px) {
  .guild-box {
    min-width: 122px;
    font-size: .92rem;
    padding: 7px 8px;
  }

  .vs-label {
    width: 100%;
    line-height: 1;
  }
}

/* Registered guilds showcase */
.guilds-section {
  margin: 0 auto 28px;
  width: 100%;
}

.guilds-header {
  margin: 0 auto 22px;
  text-align: center;
}

.guilds-title-badge {
  display: inline-block;
  padding: 8px 16px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: linear-gradient(45deg, var(--violet), var(--blue-2));
  color: #fff;
  font-weight: 800;
  letter-spacing: .4px;
  box-shadow: 0 6px 16px rgba(48, 79, 254, .24);
}

.guilds-header h2 {
  margin: 0;
  color: #151515;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.guilds-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guild-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,247,255,0.96));
  border: 1px solid rgba(98, 0, 234, 0.18);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

.guild-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--violet));
}

.guild-card-header {
  padding: 18px 18px 12px;
  background: linear-gradient(135deg, rgba(20, 60, 119, .06), rgba(98, 0, 234, .08));
  border-bottom: 1px solid rgba(98, 0, 234, .10);
}

.guild-card-header h3 {
  margin: 0;
  color: #131313;
  font-size: 1.18rem;
  line-height: 1.2;
}

.guild-card-header span {
  display: inline-block;
  margin-top: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #243b6b;
  border: 1px solid #cfd8ff;
  font-size: .86rem;
  font-weight: 800;
}

.guild-members {
  list-style: none;
  margin: 0;
  padding: 12px 18px 18px;
  counter-reset: member-counter;
}

.guild-members li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 10px 40px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  color: #2a2a2a;
  font-weight: 700;
  line-height: 1.3;
}

.guild-members li:last-child {
  border-bottom: 0;
}

.guild-members li::before {
  counter-increment: member-counter;
  content: counter(member-counter);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, var(--violet), var(--blue-2));
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(48, 79, 254, .22);
}

.guild-members li.leader-entry {
  color: #5c3400;
  font-weight: 900;
}

.guild-members li.leader-entry::before {
  background: linear-gradient(45deg, var(--gold-dark), var(--gold));
  color: #2b1800;
  box-shadow: 0 4px 10px rgba(255, 200, 77, .28);
}

.role-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff4cf;
  color: #8a5500;
  border: 1px solid rgba(182, 120, 24, .28);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .35px;
}

@media (max-width: 980px) {
  .guilds-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .guilds-section {
    margin-bottom: 18px;
  }

  .guilds-grid {
    grid-template-columns: 1fr;
  }

  .guild-card-header,
  .guild-members {
    padding-left: 14px;
    padding-right: 14px;
  }

  .guild-members li {
    padding-left: 38px;
    font-size: .95rem;
  }

  .role-badge {
    min-width: 58px;
    font-size: .7rem;
  }
}
