:root {
  --bg: #07080c;
  --surface: #10131b;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f9ff;
  --muted: #9da8ba;
  --gold: #f7c948;
  --gold-2: #f59e0b;
  --cyan: #22d3ee;
  --green: #7ddc64;
  --danger: #ff4d5f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
    radial-gradient(780px 420px at 20% 10%, rgba(247, 201, 72, 0.14), transparent 62%),
    radial-gradient(620px 360px at 90% 0%, rgba(34, 211, 238, 0.12), transparent 60%),
    linear-gradient(180deg, #07080c 0%, #0d1117 52%, #090a0e 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-wrapper {
  min-height: 100vh;
  padding: 28px 16px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 460px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--surface);
  box-shadow: var(--shadow);
}

.auth-header {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.back-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-size: 1.2rem;
}

.back-btn:hover {
  border-color: rgba(247, 201, 72, 0.36);
  background: rgba(247, 201, 72, 0.1);
}

.auth-brand {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(247, 201, 72, 0.25));
}

.auth-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 0.95;
  font-weight: 950;
  text-transform: uppercase;
}

.subtitle,
.secondary-note,
.message {
  color: var(--muted);
}

.subtitle {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

.social-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.secondary-note {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 750;
}

#googleLoginBtn {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #111;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  font-weight: 900;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}

#googleLoginBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

#googleLoginBtn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

#googleLoginBtn::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.73 1.22 9.25 3.61l6.91-6.91C36.2 2.43 30.45 0 24 0 14.62 0 6.51 5.38 2.56 13.22l8.02 6.23C12.5 13.36 17.77 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.5 24.5c0-1.6-.14-2.78-.44-4.02H24v7.64h12.93c-.26 2.06-1.66 5.17-4.76 7.25l7.33 5.68c4.39-4.05 6.99-10 6.99-16.55z'/%3E%3Cpath fill='%23FBBC05' d='M10.58 28.45A14.5 14.5 0 0 1 9.82 24c0-1.55.28-3.04.76-4.45l-8.02-6.23A23.96 23.96 0 0 0 0 24c0 3.91.94 7.6 2.56 10.78l8.02-6.33z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.45 0 11.86-2.13 15.81-5.79l-7.33-5.68c-1.96 1.37-4.59 2.32-8.48 2.32-6.23 0-11.5-3.86-13.42-9.4l-8.02 6.33C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E");
}

.telegram-login-wrap {
  min-height: 48px;
  display: grid;
  place-items: center;
}

.telegram-login-wrap iframe {
  border-radius: 999px;
}

.telegram-fallback-btn {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  color: #061013;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 950;
}

.social-divider {
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.social-divider::before,
.social-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
}

.auth-tabs {
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.tab.active {
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.captcha-box {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d8deea;
  background: rgba(255, 255, 255, 0.04);
}

.captcha-box input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--gold);
}

.captcha-box img {
  width: 36px;
  margin-left: auto;
}

.primary-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  font-size: 0.96rem;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.2);
}

.primary-btn:hover {
  filter: brightness(1.04);
}

.message {
  min-height: 18px;
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 750;
}

@media (max-width: 520px) {
  .auth-wrapper {
    align-items: start;
    padding: 14px 10px;
  }

  .auth-card {
    padding: 18px;
    border-radius: 20px;
  }
}
