:root {
  --page-bg: #05070b;
  --text: #e9edf3;
  --muted: rgba(233, 237, 243, 0.7);
  --panel: rgba(8, 12, 18, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --blue: #1b79ff;
  --focus: rgba(27, 121, 255, 0.6);
  --header-bg: linear-gradient(180deg, rgba(5, 7, 11, 0.98), rgba(5, 7, 11, 0.95));
  --art-max: 1920px;
  --content-max: 1400px;
}

* {
  box-sizing: border-box;
}

@media (min-width: 2000px) {
  :root {
    --content-max: 1560px;
  }
}

.header {
  width: 100%;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__container {
  width: min(1600px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 2vw, 24px) 0;
}

.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 1000;
  letter-spacing: 1.2px;
  line-height: 1;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 26px);
  text-shadow: 0 0 22px rgba(27, 121, 255, 0.28);
}

.brand__tld {
  font-weight: 800;
  letter-spacing: 0.6px;
  color: rgba(233, 237, 243, 0.75);
  font-size: 0.72em;
}

.header__logo-img {
  height: clamp(78px, 5.8vw, 132px);
  width: auto;
  display: block;
  user-select: none;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

.header__nav-item {
  position: relative;
}

.header__nav-btn,
.header__nav-link {
  background: transparent;
  border: 0;
  padding: 10px 12px;
  color: rgba(233, 237, 243, 0.9);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.header__nav-btn:hover,
.header__nav-link:hover,
.header__nav-btn:focus-visible,
.header__nav-link:focus-visible {
  background: rgba(27, 121, 255, 0.14);
  color: #fff;
  outline: none;
}

.header__nav-chevron {
  transition: transform 0.2s ease;
}

.header__nav-item--dropdown[data-open="true"] .header__nav-chevron {
  transform: rotate(180deg);
}

.header__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  width: min(220px, 88vw);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 8px;
  display: none;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.header__nav-item--dropdown[data-open="true"] .header__dropdown {
  display: block;
}

.header__dropdown-item {
  display: block;
  padding: 12px 14px;
  color: rgba(233, 237, 243, 0.92);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 13px;
}

.header__dropdown-item:hover,
.header__dropdown-item:focus-visible {
  background: rgba(27, 121, 255, 0.18);
  outline: none;
  color: #fff;
}

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

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

.header__admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 11px;
  letter-spacing: 0.9px;
  color: rgba(253, 230, 138, 0.98);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.header__auth-btn--admin {
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.7px;
}

.header__welcome {
  color: rgba(233, 237, 243, 0.9);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
}

.header__welcome strong {
  color: #fff;
  font-weight: 900;
}

.header__auth-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
}

.header__auth-btn--login {
  color: rgba(233, 237, 243, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 18, 0.6);
}

.header__auth-btn--login:hover,
.header__auth-btn--login:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.header__auth-btn--signup {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.header__auth-btn--signup:hover,
.header__auth-btn--signup:focus-visible {
  background: #1566d4;
  outline: none;
}

.header__auth-btn:active {
  transform: translateY(1px);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

.page {
  min-height: 100%;
}

.band {
  width: 100%;
  display: block;
}

.band--img {
  position: relative;
  display: flex;
  justify-content: center;
  background: var(--page-bg);
}

#fascia-6 {
  position: relative;
}

.band__inner {
  position: relative;
  width: min(var(--art-max), 100%);
}

.band__img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

.hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
}

.hotspot:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.hotspot--logo {
  left: 2%;
  top: 10%;
  width: 13%;
  height: 80%;
}

.hotspot--giochi {
  left: 34.5%;
  top: 18%;
  width: 5.5%;
  height: 64%;
}

.hotspot--arena {
  left: 42%;
  top: 18%;
  width: 5.5%;
  height: 64%;
}

.hotspot--tornei {
  left: 48.5%;
  top: 18%;
  width: 6%;
  height: 64%;
}

.hotspot--classifiche {
  left: 55.7%;
  top: 18%;
  width: 8.5%;
  height: 64%;
}

.hotspot--community {
  left: 65%;
  top: 18%;
  width: 8%;
  height: 64%;
}

.hotspot--eventi {
  left: 73.5%;
  top: 18%;
  width: 6.5%;
  height: 64%;
}

.hotspot--aiuto {
  left: 80.5%;
  top: 18%;
  width: 6%;
  height: 64%;
}

.hotspot--accedi {
  left: 86.5%;
  top: 18%;
  width: 6%;
  height: 64%;
}

.hotspot--registrati {
  left: 92.5%;
  top: 18%;
  width: 7%;
  height: 64%;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 32%;
  width: min(240px, 90vw);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px;
  display: none;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.dropdown[data-open="true"] {
  display: block;
}

.dropdown a {
  display: block;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: rgba(27, 121, 255, 0.18);
  outline: none;
}

.hotspot--gioca-ora {
  left: 6%;
  top: 71%;
  width: 11.5%;
  height: 13%;
}

.hotspot--crea-tavolo {
  left: 19%;
  top: 71%;
  width: 12.5%;
  height: 13%;
}

.hotspot--tornei-live {
  left: 33%;
  top: 71%;
  width: 12.5%;
  height: 13%;
}

.hotspot--vai-classifica {
  left: 76%;
  top: 53%;
  width: 19%;
  height: 12%;
}

.fascia2-stats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  row-gap: 10px;
  left: 8%;
  top: 77%;
}

.fascia2-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1eff86;
  flex-shrink: 0;
}

.tables-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.tournaments-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.fascia2-stat__value {
  color: #fff;
  font-weight: 900;
  font-size: clamp(14px, 2vw, 20px);
}

.fascia2-stat__label {
  color: rgba(233, 237, 243, 0.9);
  font-weight: 800;
  font-size: clamp(10px, 1.2vw, 13px);
  letter-spacing: 0.4px;
}

.band--carousel {
  background: radial-gradient(1200px 300px at 50% 20%, rgba(27, 121, 255, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(7, 10, 15, 0.9), rgba(5, 7, 11, 0.95));
  padding: clamp(16px, 2.4vw, 28px) 0;
}

.carousel {
  position: relative;
  width: min(var(--content-max), 92vw);
  margin: 0 auto;
}

.carousel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.carousel__title {
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 13px;
  color: var(--muted);
}

.carousel__all {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.carousel__all:hover,
.carousel__all:focus-visible {
  color: var(--text);
  outline: none;
}

.carousel__viewport {
  overflow: hidden;
  border-radius: 18px;
}

.carousel__track {
  display: flex;
  gap: 18px;
  padding: 8px 36px;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.game-card {
  flex: 0 0 clamp(160px, 18vw, 220px);
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 14px 12px;
  scroll-snap-align: start;
  text-align: center;
}

.game-card__img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.game-card__meta {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.16);
}

.dot--red {
  background: #ff3344;
  box-shadow: 0 0 0 3px rgba(255, 51, 68, 0.18);
}

.game-card--inactive .game-card__cta {
  background: rgba(255, 51, 68, 0.15);
  border: 1px solid rgba(255, 51, 68, 0.4);
  color: rgba(255, 200, 200, 0.95);
  pointer-events: none;
  opacity: 0.7;
}

.game-card__cta {
  margin-top: 10px;
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.8px;
  color: rgba(233, 237, 243, 0.95);
  background: rgba(27, 121, 255, 0.12);
  border: 1px solid rgba(27, 121, 255, 0.35);
}

.game-card__cta:hover,
.game-card__cta:focus-visible {
  outline: none;
  background: rgba(27, 121, 255, 0.2);
  border-color: rgba(27, 121, 255, 0.55);
}

.carousel__nav {
  position: absolute;
  top: 54%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 11, 0.6);
  color: rgba(233, 237, 243, 0.9);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.carousel__nav:hover,
.carousel__nav:focus-visible {
  outline: none;
  border-color: rgba(27, 121, 255, 0.6);
}

.carousel__nav--prev {
  left: -8px;
}

.carousel__nav--next {
  right: -8px;
}

.band--tournament {
  padding: clamp(16px, 2.4vw, 24px) 0;
  background: var(--page-bg);
}

.tournament {
  position: relative;
  width: min(var(--content-max), 92vw);
  margin: 0 auto;
}

.tournament--v2 {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 18px;
  align-items: stretch;
}

.tournament__media {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

.tournament__media::before {
  content: "";
  display: block;
  padding-top: calc(222 / 1402 * 100%);
}

.tournament__panel {
  background: radial-gradient(700px 240px at 20% 15%, rgba(27, 121, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(10, 14, 20, 0.94), rgba(5, 7, 11, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 18px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.tournament__kicker {
  color: rgba(233, 237, 243, 0.72);
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 12px;
}

.tournament__title {
  margin: 0;
  color: #fff;
  font-weight: 950;
  letter-spacing: 0.6px;
  font-size: clamp(18px, 2.2vw, 26px);
  text-shadow: 0 0 18px rgba(27, 121, 255, 0.22);
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
}

.tournament__countdown--panel {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(3, 5, 8, 0.58);
  box-shadow: inset 0 0 0 1px rgba(27, 121, 255, 0.10);
}

.tournament__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tournament__meta-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 5, 8, 0.55);
  color: rgba(233, 237, 243, 0.92);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.tournament__cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tournament__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.8px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.tournament__cta-btn--primary {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: #fff;
}

.tournament__cta-btn--primary:hover,
.tournament__cta-btn--primary:focus-visible {
  outline: none;
  background: #1566d4;
}

.tournament__cta-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(233, 237, 243, 0.92);
}

.tournament__cta-btn--ghost:hover,
.tournament__cta-btn--ghost:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.tournament__bg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: rgba(8, 12, 18, 0.92);
}

.tournament__bg--carousel {
  height: 100%;
  padding-top: 0;
}

.tournament__track {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  height: 100%;
  transform: translateX(0);
  transition: transform 700ms ease;
  will-change: transform;
}

.tournament__banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.tournament__countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 180ms ease;
}

.tournament__countdown--hidden {
  opacity: 0;
}

.countdown__row {
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.tournament__countdown--panel .countdown__cell {
  padding: 12px 12px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: radial-gradient(240px 90px at 20% 10%, rgba(27, 121, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(3, 5, 8, 0.86), rgba(3, 5, 8, 0.58));
  box-shadow: inset 0 0 0 1px rgba(27, 121, 255, 0.10);
}

.tournament__countdown--panel .countdown__icon {
  font-size: 14px;
  line-height: 1;
  opacity: 0.9;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 10px rgba(27, 121, 255, 0.18));
}

.tournament__countdown--panel .countdown__num {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: clamp(20px, 2.3vw, 32px);
  letter-spacing: 0.6px;
  color: #fff;
  text-shadow: 0 0 16px rgba(27, 121, 255, 0.22);
}

.tournament__countdown--panel .countdown__label {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 1.3px;
  color: rgba(233, 237, 243, 0.75);
}

.countdown__cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.countdown__num {
  min-width: 32px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(14px, 1.8vw, 20px);
  letter-spacing: 1px;
  color: rgba(233, 237, 243, 0.98);
  padding: 2px 1px;
  border-radius: 6px;
  background: rgba(3, 5, 8, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.countdown__label {
  margin-top: 0;
  font-weight: 800;
  font-size: 6px;
  letter-spacing: 1px;
  color: rgba(233, 237, 243, 0.75);
}

.band--fascia6 {
  background: radial-gradient(1200px 300px at 50% 20%, rgba(27, 121, 255, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(7, 10, 15, 0.95), rgba(3, 5, 8, 1));
  padding: 16px 0 24px;
}

.fascia6-container {
  width: min(var(--content-max), 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}

.fascia6-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 6px;
}

.fascia6-icon {
  font-size: clamp(20px, 2.8vw, 28px);
  margin-bottom: 2px;
}

.fascia6-label {
  color: rgba(233, 237, 243, 0.9);
  font-weight: 800;
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.fascia6-value {
  color: #fff;
  font-weight: 900;
  font-size: clamp(18px, 2.5vw, 26px);
  text-shadow: 0 0 16px rgba(27, 121, 255, 0.35);
}

@media (max-width: 900px) {
  .fascia6-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }
}

@media (max-width: 520px) {
  .fascia6-container {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 0 12px;
    width: 100%;
  }

  .fascia6-item {
    flex: 0 0 78%;
    min-width: 220px;
    scroll-snap-align: start;
  }
}

.fascia2-stats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 40px;
  left: 8%;
  top: 77%;
}

.fascia2-stat {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1eff86;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.16);
}

.dot--red {
  background: #ff3344;
  box-shadow: 0 0 0 3px rgba(255, 51, 68, 0.18);
}

.game-card--inactive .game-card__cta {
  background: rgba(255, 51, 68, 0.15);
  border: 1px solid rgba(255, 51, 68, 0.4);
  color: rgba(255, 200, 200, 0.95);
  pointer-events: none;
  opacity: 0.7;
}

.legal {
  text-align: center;
  padding: 18px 12px 30px;
  color: rgba(233, 237, 243, 0.7);
  font-weight: 600;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  width: min(420px, 92vw);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  color: rgba(233, 237, 243, 0.8);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal__close:hover,
.modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.modal__title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

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

.modal__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 5, 8, 0.6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-sizing: border-box;
}

.modal__input::placeholder {
  color: rgba(233, 237, 243, 0.5);
}

.modal__input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-color: transparent;
}

.modal__btn {
  padding: 14px 16px;
  border-radius: 12px;
  border: 0;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}

.modal__btn--primary {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.modal__btn--primary:hover,
.modal__btn--primary:focus-visible {
  background: #1566d4;
  outline: none;
}

.modal__btn:active {
  transform: translateY(1px);
}

.modal__link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  padding: 6px;
}

.modal__link:hover,
.modal__link:focus-visible {
  outline: none;
  color: #4f8cff;
  text-decoration: underline;
}

.modal__msg {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.modal__msg.hidden {
  display: none;
}

.top-players-overlay {
  position: absolute;
  top: 16px;
  right: 3%;
  bottom: 16px;
  width: 280px;
  width: clamp(240px, 18vw, 320px);
  pointer-events: none;
  z-index: 50;
}

.top-players-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 12px;
  box-sizing: border-box;
  background: radial-gradient(240px 120px at 25% 20%, rgba(27, 121, 255, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(10, 14, 20, 0.92), rgba(5, 7, 11, 0.9));
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.top-players-title {
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.9px;
  text-align: center;
  margin-bottom: 6px;
}

.top-players-head {
  display: grid;
  grid-template-columns: 26px 1fr 48px;
  gap: 8px;
  align-items: center;
  padding: 0 8px 6px;
  color: rgba(233, 237, 243, 0.72);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.8px;
}

.top-players-col--pos { text-align: center; }
.top-players-col--elo { text-align: right; }

.top-players-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 0 6px 2px;
}

.top-player-item {
  display: grid;
  grid-template-columns: 26px 1fr 48px;
  gap: 8px;
  align-items: center;
  position: relative;
  background: rgba(3, 5, 8, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
}

.top-player-item--me {
  border-color: rgba(30, 255, 134, 0.55);
  box-shadow: 0 0 0 1px rgba(30, 255, 134, 0.16) inset;
}

.top-player-item:nth-child(1) {
  border-color: rgba(255, 214, 102, 0.38);
  box-shadow: 0 0 0 1px rgba(255, 214, 102, 0.12) inset;
}

.top-player-item:nth-child(2) {
  border-color: rgba(210, 217, 230, 0.38);
  box-shadow: 0 0 0 1px rgba(210, 217, 230, 0.12) inset;
}

.top-player-item:nth-child(3) {
  border-color: rgba(255, 154, 92, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 154, 92, 0.10) inset;
}

.top-player-pos {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(233, 237, 243, 0.92);
  font-weight: 900;
  flex-shrink: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.top-player-item:nth-child(1) .top-player-pos {
  background: linear-gradient(180deg, rgba(255, 214, 102, 0.34), rgba(255, 214, 102, 0.12));
}

.top-player-item:nth-child(2) .top-player-pos {
  background: linear-gradient(180deg, rgba(210, 217, 230, 0.34), rgba(210, 217, 230, 0.12));
}

.top-player-item:nth-child(3) .top-player-pos {
  background: linear-gradient(180deg, rgba(255, 154, 92, 0.32), rgba(255, 154, 92, 0.12));
}

.top-player-name {
  flex: 1;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.top-player-elo {
  width: auto;
  text-align: right;
  color: #1eff86;
  font-weight: 900;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.top-players-full-btn {
  margin-top: 4px;
  padding: 8px 10px;
  background: rgba(27, 121, 255, 0.16);
  border: 1px solid rgba(27, 121, 255, 0.34);
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.6px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.top-players-full-btn:hover {
  background: rgba(27, 121, 255, 0.3);
  border-color: rgba(27, 121, 255, 0.6);
}

.modal--leaderboard {
  z-index: 300;
}

.modal__content--leaderboard {
  width: min(600px, 92vw);
  max-height: 85vh;
  padding: 0;
  overflow: hidden;
}

.leaderboard-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
}

.leaderboard-modal-close {
  background: transparent;
  border: 0;
  color: rgba(233, 237, 243, 0.8);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.leaderboard-modal-close:hover,
.leaderboard-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.leaderboard-modal-content {
  padding: 16px 24px 24px;
  max-height: calc(85vh - 80px);
  overflow-y: auto;
}

.leaderboard-modal-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.leaderboard-modal-page {
  color: rgba(233, 237, 243, 0.72);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.8px;
}

.leaderboard-modal-note {
  color: rgba(233, 237, 243, 0.72);
  font-weight: 800;
  font-size: 12px;
  text-align: right;
}

.leaderboard-modal-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 12px;
}

.leaderboard-modal-nav {
  width: 42px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.leaderboard-modal-nav:hover,
.leaderboard-modal-nav:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
}

.leaderboard-modal-nav:active {
  transform: translateY(1px);
}

.leaderboard-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.leaderboard-modal-item--me {
  border-color: rgba(30, 255, 134, 0.45);
  box-shadow: 0 0 0 1px rgba(30, 255, 134, 0.14) inset;
}

.leaderboard-modal-pos {
  width: 40px;
  color: #1b79ff;
  font-weight: 900;
  font-size: 15px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.leaderboard-modal-name {
  flex: 1;
  padding: 0 20px;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-modal-elo {
  width: 60px;
  text-align: right;
  color: #1eff86;
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .header__container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
  }

  .header__logo {
    flex: 0 0 auto;
  }

  .header__logo-img {
    height: 72px;
  }

  .header__nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px;
    gap: 10px;
  }

  .header__nav-btn,
  .header__nav-link {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 10px;
  }

  .header__auth {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header__admin-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .carousel__nav {
    display: none;
  }

  .carousel__track {
    padding: 8px 14px;
  }

  .tournament__countdown.tournament__countdown--panel {
    left: auto;
    top: auto;
    width: 100%;
  }

  .top-players-overlay {
    right: 2%;
    top: 14px;
    bottom: 14px;
    width: min(260px, 42vw);
  }
}

@media (max-width: 920px) {
  .tournament--v2 {
    grid-template-columns: 1fr;
  }

  .tournament__media {
    aspect-ratio: 1402 / 222;
  }
}

@media (max-width: 520px) {
  .header__logo-img {
    height: 64px;
  }

  .header__welcome {
    font-size: 12px;
    padding: 8px 10px;
    text-align: center;
  }

  .header__auth-btn {
    padding: 10px 14px;
  }

  .fascia2-stats {
    gap: 18px;
    left: 6%;
    top: 78%;
  }

  .fascia2-stat__value {
    font-size: 14px;
  }

  .fascia2-stat__label {
    font-size: 10px;
  }

  .top-players-overlay {
    position: static;
    width: min(520px, 92vw);
    height: auto;
    margin: 12px auto 0;
    pointer-events: auto;
  }

  .top-players-box {
    height: auto;
    padding: 10px 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
  }

  .top-players-head {
    grid-template-columns: 30px 1fr 56px;
    padding: 0 10px 8px;
  }

  .top-players-list {
    padding: 0;
  }

  .top-players-title {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .top-player-item {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .top-player-name,
  .top-player-pos,
  .top-player-elo {
    font-size: 11px;
  }
}

@media (max-width: 520px) and (orientation: portrait) {
  .tournament__media::before {
    padding-top: 56.25%;
  }

  .tournament__banner {
    object-fit: contain;
    object-position: center;
  }

  .tournament__panel {
    padding: 14px;
    gap: 12px;
  }

  .tournament__title {
    font-size: 18px;
  }

  .tournament__countdown.tournament__countdown--panel {
    left: auto;
    top: auto;
    width: 100%;
  }

  .countdown__row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tournament__countdown--panel .countdown__cell {
    padding: 10px 10px 9px;
  }

  .tournament__countdown--panel .countdown__num {
    font-size: 22px;
  }

  .tournament__countdown--panel .countdown__label {
    font-size: 9px;
  }

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

  .tournament__cta-btn {
    padding: 11px 10px;
    font-size: 11px;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .header__container {
    padding: 10px 0;
  }

  .header__logo-img {
    height: 56px;
  }

  .header__nav {
    gap: 12px;
  }

  .header__nav-btn,
  .header__nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }

  .header__welcome {
    padding: 8px 10px;
    font-size: 12px;
  }

  .header__auth-btn {
    padding: 8px 12px;
  }

  .band--carousel {
    padding: 12px 0;
  }

  .carousel__header {
    margin-bottom: 10px;
  }

  .carousel__track {
    padding: 6px 14px;
    gap: 14px;
  }

  .game-card__img {
    height: 82px;
  }

  .band--tournament {
    padding: 12px 0;
  }

  .tournament {
    width: min(1400px, 96vw);
  }

  .tournament--v2 {
    grid-template-columns: 1fr minmax(280px, 340px);
    gap: 12px;
  }

  .tournament__panel {
    padding: 14px;
    gap: 10px;
  }

  .tournament__countdown--panel {
    padding: 8px;
    border-radius: 12px;
  }

  .countdown__row {
    gap: 8px;
  }

  .tournament__countdown--panel .countdown__cell {
    padding: 10px 10px 9px;
    border-radius: 10px;
  }

  .tournament__countdown--panel .countdown__icon {
    margin-bottom: 4px;
  }

  .tournament__countdown--panel .countdown__label {
    margin-top: 4px;
    font-size: 9px;
  }

  .tournament__cta {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tournament__cta-btn {
    padding: 10px 12px;
  }

  .band--fascia6 {
    padding: 12px 0 16px;
  }

  .fascia6-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px;
    width: 100%;
  }

  .fascia6-item {
    flex: 0 0 24%;
    min-width: 170px;
  }

  .fascia6-icon {
    font-size: 20px;
  }

  .fascia6-label {
    font-size: 9px;
  }

  .fascia6-value {
    font-size: 18px;
  }
}
