* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: #f5f7fb;
  color: #222;
  display: grid;
  place-items: center;
}

.container {
  width: 92%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 28px 24px 24px;


  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease-out forwards;
}


@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.desc {
  margin: 0 0 18px;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.tab-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f3f7;
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 16px;
}
.tab-btn {
  border: none;
  background: transparent;
  padding: 10px 0;
  border-radius: 8px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn.active {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  color: #111;
}

.form-container {
  display: block;
}
.hidden {
  display: none;
}

.field {
  margin-bottom: 12px;
}
.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e3e6ee;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.password-wrapper {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 6px;
}

.agreement {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font-size: 13px;
  color: #555;
}

.primary-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .08s ease, filter .2s ease, opacity .2s ease;
}
.primary-btn:hover {
  filter: brightness(1.05);
}
.primary-btn:active {
  transform: translateY(1px);
}
.primary-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

.alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.alert-box {
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 300px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.alert-box p {
  margin-bottom: 15px;
  font-size: 16px;
}

.alert-box button {
  padding: 6px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.alert-box button:hover {
  background: #0056b3;
}

.telegram-section {
  text-align: center;
  margin-top: 30px;
}

.telegram-icon {
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.2s;
  opacity: 0.9;
}

.telegram-icon:hover {
  transform: scale(1.08);
  opacity: 1;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup-box {
  background: white;
  padding: 20px 25px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease;
}

.popup-box h2 {
  margin-bottom: 10px;
}

.telegram-account {
  font-size: 18px;
  color: #0088cc;
  margin-bottom: 10px;
  user-select: all;
}

.copy-btn {
  background-color: #0088cc;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 15px;
}

.copy-btn:hover {
  background-color: #0077b6;
}

.qr-container {
  margin-bottom: 15px;
}

.telegram-qr {
  width: 250px;
  height: 250px;
  border-radius: 10px;
}

.close-btn {
  color: white;
  background-color: #0353ff;
  width: 100%;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.close-btn:hover {
  background-color: #0c9eff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.telegram-btn {
  background: none;
  border: none;
  color: #0088cc;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.1s ease;
}
