@import url('/shared/tokens.css');

* { box-sizing: border-box; }

html,
body,
#__nuxt {
  min-height: 100%;
  margin: 0;
}

body { background: #0b0e12; }

.legacy-login-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
  color: #f6f7f9;
  font-family: var(--font-system);
  background:
    radial-gradient(circle at 50% 48%, rgba(42, 51, 64, 0.22) 0, rgba(15, 18, 23, 0.08) 30%, transparent 58%),
    linear-gradient(135deg, #0d1014 0%, #090c10 52%, #0e1115 100%);
}

.login-container {
  width: min(100%, 560px);
  animation: login-enter var(--duration-smooth) var(--easing-default) both;
}

.login-card {
  padding: 49px 57px 35px;
  overflow: hidden;
  border: 1px solid rgba(143, 153, 168, 0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(24, 28, 34, 0.78), rgba(16, 19, 24, 0.72));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(18px);
}

.logo { text-align: center; }

.avatar {
  display: block;
  width: 142px;
  height: 142px;
  margin: 0 auto 20px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 65, 220, 0.22));
}

.logo h1 {
  margin: 0;
  font-size: clamp(38px, 4vw, 48px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -1.7px;
}

.logo h1 span { color: #2586e9; }

.welcome-text {
  margin: 17px 0 37px;
  text-align: center;
}

.welcome-text p {
  margin: 0;
  color: #9da3af;
  font-size: 19px;
  line-height: 1.48;
}

.login-section { margin: 0; }

#telegram-login-container {
  display: flex;
  min-height: 70px;
}

#telegram-login-container .tg-auth-button {
  display: flex;
  width: 100%;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 24px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font: 650 21px/1 var(--font-system);
  cursor: pointer;
  background: linear-gradient(135deg, #2699ee, #2388df);
  box-shadow: 0 14px 30px rgba(0, 102, 220, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
}

#telegram-login-container .tg-auth-button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0, 102, 220, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#telegram-login-container .tg-auth-button:active:not(:disabled) { transform: translateY(0); }

#telegram-login-container .tg-auth-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.divider {
  display: flex;
  align-items: center;
  gap: 27px;
  margin: 44px 0 35px;
  color: #9da3af;
  font-size: 14px;
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: rgba(151, 160, 172, 0.23);
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  padding: 0 12px 40px;
  border-bottom: 1px solid rgba(151, 160, 172, 0.2);
}

.feature {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.feature-icon {
  flex: 0 0 auto;
  color: #fff;
  font-size: 31px;
  font-variation-settings: "FILL" 0, "wght" 420, "GRAD" 0, "opsz" 32;
}

.feature strong,
.feature small {
  display: block;
  white-space: nowrap;
}

.feature strong {
  margin-bottom: 4px;
  color: #f5f6f8;
  font-size: 15px;
  font-weight: 600;
}

.feature small {
  color: #9da3af;
  font-size: 14px;
}

.footer {
  padding-top: 32px;
  text-align: center;
}

.footer p {
  margin: 0;
  color: #9da3af;
  font-size: 14px;
}

.footer a {
  color: #2494e8;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: #65b9f5;
  text-decoration: underline;
}

.error {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  text-align: center;
}

.error-title {
  margin-bottom: 4px;
  color: #ff7373;
  font-size: 14px;
  font-weight: 650;
}

.error-message {
  color: #b7bbc3;
  font-size: 13px;
}

@keyframes login-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .legacy-login-page { padding: 16px; }

  .login-card { padding: 35px 24px 27px; }

  .avatar {
    width: 112px;
    height: 112px;
    margin-bottom: 16px;
  }

  .logo h1 { font-size: 36px; }

  .welcome-text { margin: 14px 0 28px; }

  .welcome-text p { font-size: 16px; }

  #telegram-login-container,
  #telegram-login-container .tg-auth-button { min-height: 60px; }

  #telegram-login-container .tg-auth-button {
    border-radius: 13px;
    font-size: 18px;
  }

  .divider { margin: 32px 0 27px; }

  .features {
    gap: 18px;
    padding: 0 0 30px;
  }

  .feature { gap: 10px; }

  .feature-icon { font-size: 25px; }

  .feature strong { font-size: 13px; }

  .feature small,
  .footer p { font-size: 12px; }

  .footer { padding-top: 25px; }
}
