*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 90%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0e;
  color: #fff;
  font-family: "Play", sans-serif;
  background-color: hsl(var(--background));
  --background: 240 10% 3.9%;
}

a {
  color: #ff4300;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

:root {
  --panel-bg: #121212;
  --border: #262626;
  --orange: #ff4300;
  --orange-dim: #9f2e00;
  --panel-w: 550px;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo {
  margin-bottom: 24px;
}
.logo img {
  height: 2rem;
}

.box {
  width: var(--panel-w);
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: opacity 0.2s ease-in;
  opacity: 1;
}
.title {
  font-size: 1rem;
  line-height: 1.5rem;
  text-align: center;
  --tw-text-opacity: 1;
  color: rgb(204 204 204 / var(--tw-text-opacity, 1));
  margin-bottom: 22px;
}

.card {
  display: flex;
  align-items: center;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 17px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 3rem;
  margin-top: 2rem;
}
.team-icon {
  flex: 0 0 95px;
  height: 95px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 20px;
}
.team-icon img {
  width: 100%;
}
.info {
  display: flex;
  flex-direction: column;
}
.team-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.invite-label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  background: #000;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 12px;
  width: max-content;
  margin-top: 5px;
}

.confirm-line {
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  --tw-text-opacity: 1;
  color: rgb(209 213 219 / var(--tw-text-opacity, 1));
  margin-bottom: 24px;
}
.confirm-line input {
  appearance: none;
  width: 30px;
  height: 25px;
  margin: 0 14px 0 0;
  cursor: pointer;
  border: 2px solid #8e9096;
  border-radius: 4px;
  background: #0d0d0e;
  position: relative;
}
.confirm-line input:checked {
  background: var(--orange);
  border-color: var(--orange);
}
.confirm-line input:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.confirm-line input:checked + label {
  color: #fff;
}

.confirm-btn {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.25s, color 0.25s;
}
.confirm-btn:disabled {
  background: var(--orange-dim);
  color: #bfbfbf;
  cursor: not-allowed;
}
.confirm-btn.enabled {
  background: var(--orange);
  color: #fff;
  cursor: pointer;
}

.footer {
  width: var(--panel-w);
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #888;
}
.lang-select {
  position: relative;
  width: 220px;
}
.lang-select select {
  width: 100%;
  height: 46px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 16px;
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  padding: 0 46px 0 14px;
  font-family: "Play", sans-serif;
}
.lang-select::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  pointer-events: none;
}
.links a {
  --tw-text-opacity: 1;
  color: rgb(167 167 167 / var(--tw-text-opacity, 1));
  font-size: 0.75rem;
  line-height: 1rem;
  margin-left: 5px;
}
.links a:first-child {
  margin-left: 0;
}
.links a:hover {
  color: #fff;
}

/* OVERLAY & MODALS */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #0d0d0e;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.modal {
  border-radius: 8px;
  overflow: hidden;
  /* box-shadow: 0 0 18px rgba(0, 0, 0, 0.55); */
  max-width: 560px;
}

/* LOADING */
#loadingModal {
  width: 580px;
  background: var(--panel-bg);
  text-align: center;
  color: #ccc;
  font-size: 14px;
}
.banner {
  background-image: linear-gradient(
      to top,
      rgb(18, 18, 18) 70px,
      rgba(18, 18, 18, 0.5) 90px,
      rgba(0, 0, 0, 0) 100%
    ),
    url(../images/hub-banner.png);
  width: 100%;
  height: 100%;
  background-size: 350%;
  background-position: center center;
  max-height: 90vh;
  overflow-y: auto;
}
.h-220 {
  height: 220px;
}
.loading-avatar {
  width: 80px;
  height: 80px;
  margin: auto;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
}
.loading-avatar img {
  width: 100%;
}
.nickname {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 34px;
}
.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 34px;
  border: 6px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loading-text {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.loading-text br.line-gap {
  display: block;
  margin-top: 12px;
}

/* ERROR (same as loading) */
.error-container {
  width: 580px;
  background: var(--panel-bg);
  position: relative;
  text-align: center;
  color: #ccc;
  font-size: 14px;
}
.error-container .banner {
}
.error-container .loading-avatar {
  margin: -57px auto 14px;
}
.error-container .nickname .error2-logo-text{
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}.error-container .nickname .error2-logo-descr{
    --tw-text-opacity: 1;font-size: .875rem;
    line-height: 1.25rem;text-align: center;
    color: rgb(241 241 241 / var(--tw-text-opacity, 1));
}
#details2{
    transition: top 0.4s ease;

}
.error-container .nickname {
  display: flex;flex-direction: column;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: 0;
  color: #4a4a4a;
  font-size: 26px;
  cursor: pointer;
}

.text-box {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  width: calc(100% - 48px);
  margin: 0 auto 32px;
  font-size: 14px;
  line-height: 1.55;
  color: #ccc;
  padding: 24px;
  text-align: left;
}
.title-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.title-row svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}
.error-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.text-box p {
  margin-bottom: 12px;
}
.text-box p:last-of-type {
  margin-bottom: 10px;
}

.details {
  display: none;
}
.details p {
  margin-bottom: 8px;
}
.details ol {
  margin-left: 18px;
}
.details li {
  margin-bottom: 6px;
}

.read-more {
  display: inline-block;
  font-size: 14px;
  color: var(--orange);
  cursor: pointer;
}
.hide-details {
  display: none;
  font-size: 14px;
  color: #888;
  margin-top: -5px;
  cursor: pointer;
  text-align: right;
  float: right;
}

.footer-msg {
  text-align: center;
  padding: 16px 0 24px;
  font-size: 12px;
  color: #ccc;
}
.footer-msg .line1 {
  margin-bottom: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.footer,
.links a {
  transition: opacity 0.2s ease-in;
  opacity: 1;
}
.lang-select select {
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
}
.lang-select select:focus-visible {
  outline: none;
}
.lang-select {
  position: relative;
  display: inline-block;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 12px;
  /* box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); */
  max-width: 500px;
  width: 90%;
  position: relative;
  display: none;opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
}
.modal.show {
  display: block;
  opacity: 1;
  transform: scale(1);
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}
#loadingModal {
  position: relative;
  max-width: 560px;
}
.text_after_banner {
  position: absolute;
  width: 100%;
  align-items: center;
  top: 35%;
}
.loading-modal-start {
  position: relative;
}
.spinner_div {
  min-height: 140px;
}
.loading-modal-end {
  margin-top: 1.25rem;
  margin-bottom: 2.5rem;
}
.loading-text a {
  color: rgb(241 241 241 / var(--tw-text-opacity, 1));
  font-size: 0.875rem;
  line-height: 1.25rem;
  margin-top: 0.25rem;
}
.loading-text .first_p_text {
  color: rgb(241 241 241 / var(--tw-text-opacity, 1));
  font-size: 0.875rem;
  line-height: 1.25rem;
  margin-top: 16px;
  margin-bottom: 14px;
}
.close_button {
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  position: absolute;
  background-color: transparent;
  background-image: none;
  border: none;
  top: 10%;
  right: 5%;
  padding-top: 3px;
}
.close_button:hover {
  background-color: #38383866;
  border-radius: calc(var(--radius) - 4px);
  --radius: 0.5rem;
}
.modal1-start{
  position: absolute;
  width: 100%;
  top: 25%;
}

.mybutton {
  display: inline-block;
  width: 100%;               /* или задайте фиксированную ширину, если нужно */
  max-width: 300px;          /* чтобы не растягивалась слишком */
  padding: 14px 0;           /* по высоте как у остальных кнопок */
  background: var(--orange); /* #ff4300 */
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.mybutton:hover {
  filter: brightness(0.9);
}

.mybutton:active {
  filter: brightness(0.8);
}


/* ============================================================
   LOADING MODALS — финальный фикс (верстка + спиннер + тексты)
   Применяется ТОЛЬКО к: #loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount
   ============================================================ */

/* 0) Базовый фон/ширина, как у рабочего экрана */
#loadingModal,
#loadingFamily,
#loadingCheckTrade,
#loadingCheckAccount {
  background: var(--panel-bg) !important;
  color: #ccc;
}
#loadingModal.modal,
#loadingFamily.modal,
#loadingCheckTrade.modal,
#loadingCheckAccount.modal {
  width: 580px !important;
  max-width: 560px !important;
  background: var(--panel-bg) !important;
}

/* 1) Центрируем аватар и "EgoDraft" так же, как в рабочих модалках */
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .loading-modal-start {
  position: relative !important; /* опорный контейнер */
}
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .text_after_banner {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 35% !important;                 /* при необходимости подними/опусти (25–40%) */
  width: 100% !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;      /* центр по горизонтали */
  justify-content: flex-start !important;
  text-align: center !important;       /* и сам текст по центру */
}
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .text_after_banner .nickname {
  margin: 12px 0 0 0 !important;       /* аккуратный отступ сверху */
  text-align: center !important;
}

/* 2) Тексты под спиннером: только первая строка — акцент */
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .loading-text {
  font-weight: 400 !important;
  font-size: 0.875rem !important;      /* как было */
  line-height: 1.25rem !important;
  color: inherit !important;           /* возьмет #ccc */
  text-align: center;
}
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .loading-text .first_p_text,
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .loading-text p:first-child {
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.2px;
  color: #f1f1f1 !important;
}
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .loading-text p:not(.first_p_text):not(:first-child) {
  font-weight: 400 !important;
  font-size: 0.875rem !important;
  color: inherit !important;           /* #ccc */
}
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .loading-text a {
  font-weight: 400 !important;
  font-size: 0.875rem !important;
  color: rgb(241 241 241) !important;  /* как у тебя */
}

/* 3) Кольцевой спиннер (возврат с гарантией) */
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .spinner {
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto 34px !important;
  border: 6px solid rgba(255, 255, 255, 0.15) !important;
  border-top-color: #fff !important;
  border-radius: 50% !important;
  background: transparent !important;
  animation: spin 1s linear infinite !important;
  box-shadow: none !important;
  color: inherit !important;
}
/* На всякий случай отключим «три точки», если где-то были */
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .spinner::before,
:is(#loadingModal, #loadingFamily, #loadingCheckTrade, #loadingCheckAccount) .spinner::after {
  content: none !important;
}
