.welcome-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
  text-align: center;

  background: #010e26;
  background-image: url('/img/welcome-bg.webp');
  background-size: cover;
  background-position: center;
}

.welcome__inner {
  width: 100%;
  max-width: 942px;
}

.welcome .tournaments {
  background: #010e26;
}

.welcome__title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 40px;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
@media (min-width: 1024px) {
  .welcome-hero {
    padding-block: 160px;
  }
  .welcome__title {
    font-size: 72px;
  }
}

.welcome__lead {
  color: #dfe6f2;
  font-size: 16px;
  margin: 18px auto 0;
}
@media (min-width: 1024px) {
  .welcome__lead {
    font-size: 20px;
    margin-top: 22px;
  }
}

.welcome__cta {
  margin-top: 30px;
}
@media (min-width: 1024px) {
  .welcome__cta {
    margin-top: 40px;
    padding: 18px 42px;
    font-size: 18px;
  }
}

.welcome__season-title {
  font-weight: 700;
  font-size: 20px;
  margin-top: 34px;
}
@media (min-width: 1024px) {
  .welcome__season-title {
    font-size: 26px;
    margin-top: 46px;
  }
}

.season {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}
@media (min-width: 1024px) {
  .season {
    gap: 10px;
    margin-top: 24px;
  }
}

.season__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 66px;
  padding: 14px 10px;
  background: rgba(4, 10, 26, 0.6);
  border: 1px solid rgba(61, 155, 224, 0.4);
  border-radius: 12px;
}
@media (min-width: 1024px) {
  .season__box {
    min-width: 92px;
    padding: 18px 14px;
  }
}

.season__num {
  color: var(--blue);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
@media (min-width: 1024px) {
  .season__num {
    font-size: 38px;
  }
}

.season__unit {
  color: #cdd6e6;
  font-size: 12px;
}
@media (min-width: 1024px) {
  .season__unit {
    font-size: 14px;
  }
}

.season__sep {
  color: var(--muted);
  font-weight: 700;
  font-size: 20px;
}
@media (min-width: 1024px) {
  .season__sep {
    font-size: 28px;
  }
}

/* --------------------------------------------------------------------------
   ПРИВАТНИЙ ХЕДЕР — блок користувача (іконка + username + вихід)
   -------------------------------------------------------------------------- */
.user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user__box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  background: rgba(4, 10, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--blue);
  box-shadow: 0 0 14px -6px rgba(61, 155, 224, 0.8);
}

.user__name {
  font-weight: 700;
  font-size: 14px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .user__name {
    max-width: 200px;
  }
}

.user__logout {
  min-width: fit-content;
  padding: 9px 16px;
  font-size: 13px;
}

/* Ховаємо тіло, доки guard не підтвердив авторизацію (без «мигання» контенту) */
html.auth-checking body {
  visibility: hidden;
}

/* --------------------------------------------------------------------------
   IFRAME
   -------------------------------------------------------------------------- */
/* Секція нічого не резервує, поки гру не відкрито.
   Показ/приховування керується у JS через display на #gameIframeWrapper,
   тож порожнього місця немає, а при закритті блок зникає. */
.frame-container {
  margin-top: -1px;
}

/* Обгортка тісно обхоплює iframe і центрується — завдяки цьому
   close-button завжди сідає в кут самої гри, а не над порожнім місцем. */
.game-iframe-wrapper {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 30px;
}

.game-iframe {
  display: block;
  width: 400px;
  max-width: 100%; /* щоб не вилазив по горизонталі на вузьких екранах */
  height: 300px;
  border: none;
  border-radius: 12px;
}

@media screen and (min-width: 1205px) {
  .frame-container {
    margin-top: -1px;
  }

  .game-iframe-wrapper {
    padding: 50px;
  }
  .game-iframe {
    width: 800px;
    height: 500px;
  }
}

/* Кнопка закриття — верхній правий кут гри, гарантовано не вилазить.
   top/right = padding обгортки, тож кнопка сідає точно в кут iframe. */
.close-button {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  border: none;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  background-color: transparent;
}
.close-button img {
  width: 100%;
  height: 100%;
  display: block;
}

@media screen and (min-width: 1205px) {
  .close-button {
    top: 50px;
    right: 50px;
  }
}
