@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

/* ==== Ümumi və Arxa Fon Stilləri ==== */
body {
  margin: 0;
  min-height: 100vh; /* DƏYİŞİKLİK BURADADIR */
  font-family: "Inter", sans-serif;
  background: #0b111a;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #e6edf3;
  position: relative;
  /* overflow: hidden; SƏTRİ SİLİNDİ */
}

.bg {
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(164, 80, 255, 0.25),
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(241, 91, 181, 0.23),
      transparent 50%
    ),
    radial-gradient(
      circle at 35% 85%,
      rgba(36, 198, 220, 0.22),
      transparent 50%
    );
  filter: blur(40px);
  animation: blobs 18s ease-in-out infinite alternate;
}

@keyframes blobs {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(2%, -1%) scale(1.05);
  }
}

/* ==== Səhifə Başlığı ==== */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 30px;
  display: flex;
  justify-content: flex-end;
  z-index: 100;
}

.btn-header {
  padding: 10px 24px;
  background: #00ff90;
  color: #0b111a;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.btn-header:hover {
  opacity: 0.85;
}

/* ==== Forma Konteyneri ==== */
.form-container {
  width: 800px;
  display: flex;
  align-items: stretch;
  background: transparent;
  padding: 40px 0; /* Yuxarıdan və aşağıdan boşluq əlavə etdik */
  border: none;
  box-shadow: none;
}

/* ==== Formanın Dizaynı ==== */
.social-side {
  flex: 1;
  padding-right: 40px;
}

.email-side {
  flex: 1;
  padding-left: 40px;
}

h2 {
  font-size: 36px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 25px;
  color: #fff;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(30, 36, 44, 0.9);
  color: #e6edf3;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-btn:hover {
  border-color: #fff;
}
.social-btn svg {
  width: 24px;
  height: 24px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: #9aa9bc;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
  box-sizing: border-box;
  margin-bottom: 20px;
  background-color: #0b111a;
  color: #e6edf3;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #00ff90;
  box-shadow: 0 0 12px rgba(0, 255, 144, 0.3);
}

button[type="submit"] {
  width: 100%;
  padding: 14px 0;
  background: #00ff90;
  color: #0b111a;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.2s ease;
  margin-top: 10px;
}

button[type="submit"]:hover {
  opacity: 0.85;
}

.alt-link,
.forgot-link {
  margin-top: 25px;
  font-size: 14px;
  text-align: center;
  color: #9aa9bc;
}

.alt-link a,
.forgot-link a {
  color: #00ff90;
  text-decoration: none;
  font-weight: 600;
}

.alt-link a:hover,
.forgot-link a:hover {
  text-decoration: underline;
}

/* ==== Separator Stilləri ==== */
.separator {
  /* Login üçün şaquli */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.separator-line {
  width: 1px;
  flex-grow: 1;
  background-color: rgba(255, 255, 255, 0.15);
}

.separator-text {
  padding: 20px 0;
  color: #9aa9bc;
  font-weight: 600;
}

.separator-horizontal {
  display: flex;
  align-items: center;
  text-align: center;
  color: #9aa9bc;
  margin: 25px 0;
}
.separator-horizontal::before,
.separator-horizontal::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.separator-horizontal:not(:empty)::before {
  margin-right: 1em;
}
.separator-horizontal:not(:empty)::after {
  margin-left: 1em;
}

/* ==== Xəta Mesajları və Stillər ==== */
#message-box {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 200;
}
.message-error {
  background-color: rgba(255, 82, 82, 0.9);
  color: #fff;
}
.message-success {
  background-color: rgba(0, 255, 144, 0.9);
  color: #0b111a;
}

.password-requirements {
  font-size: 13px;
  color: #9aa9bc;
  margin-top: -10px;
  margin-bottom: 20px;
  padding-left: 5px;
}

.username-preview {
  font-size: 13px;
  color: #9aa9bc;
  margin-top: -15px;
  margin-bottom: 20px;
  word-break: break-all;
}

.username-preview span {
  font-weight: bold;
  color: #e6edf3;
}

.input-error-message {
  font-size: 13px;
  color: #ff5252;
  margin-top: -15px;
  margin-bottom: 10px;
  min-height: 15px;
}

input.error {
  border-color: #ff5252 !important;
  box-shadow: 0 0 8px rgba(255, 82, 82, 0.3) !important;
}

/* ==== YENİ: Şifrə Bərpa Linki ==== */
.forgot-link {
  text-align: right;
  margin-top: 12px;
  font-size: 0.9rem;
}

.forgot-link a {
  color: #a0a0a0;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==== YENİ: MODAL PƏNCƏRƏSİ STILLƏRİ ==== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.modal-content {
  background-color: #1e1e1e;
  border-radius: 12px;
  border: 1px solid #333;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 450px;
  overflow: hidden;
  transform: scale(1);
  transition: transform 0.3s;
}

.modal-overlay.hidden .modal-content {
  transform: scale(0.95);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #333;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #888;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-body p {
  margin: 0;
  color: #ccc;
  line-height: 1.5;
  font-size: 0.95rem;
}

.modal-body input[type="email"] {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background-color: #2a2a2a;
  color: #fff;
  font-size: 1rem;
}

.modal-body .btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background-color: #007bff;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-body .btn:hover {
  background-color: #0056b3;
}

/* ==== YENİ: Status Mesajları (Modal üçün) ==== */
.status-message {
  font-weight: 600;
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  min-height: 44px;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}
.status-message.success {
  color: #56d364;
  background-color: rgba(86, 211, 100, 0.1);
}
.status-message.error {
  color: #f85149;
  background-color: rgba(248, 81, 73, 0.1);
}
.status-message.info {
  color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.1);
}

/* ==== Mobil Cihazlar Üçün Media Sorğuları ==== */

@media (max-width: 800px) {
  /* Formanı bütün ekranı tutması üçün tənzimləyirik */
  body {
    align-items: flex-start; /* Formanı yuxarıya sabitləyirik */
    padding-top: 80px; /* Header üçün boşluq */
  }

  .form-container {
    flex-direction: column; /* Yan-yana olan hissələri alt-alta düzürük */
    width: 90%;
    max-width: 450px; /* Maksimum en təyin edirik */
    padding: 0;
  }

  /* Yan tərəflərdəki boşluqları sıfırlayırıq */
  .social-side,
  .email-side {
    padding-left: 0;
    padding-right: 0;
  }

  /* Login səhifəsindəki şaquli ayırıcı xətti gizlədirik */
  .separator {
    display: none; /* Şaquli xətt gizlənir */
  }

  /* Login səhifəsinə qeydiyyat səhifəsindəki kimi üfüqi ayırıcı əlavə edirik */
  .social-side::after {
    content: "VƏ YA";
    display: flex;
    align-items: center;
    text-align: center;
    color: #9aa9bc;
    margin: 25px 0;
  }
  .social-side::after::before,
  .social-side::after::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  .social-side::after:not(:empty)::before {
    margin-right: 1em;
  }
  .social-side::after:not(:empty)::after {
    margin-left: 1em;
  }
}
