/* Główne style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    min-height: 650px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('background2.png');
    background-size: cover; /* Wypełnienie tła */
    background-position: center; /* Wyśrodkowanie obrazu */
}

.register-container {
    width: 320px;
    padding: 1.5em;
    background-color: rgba(255, 255, 255, 0.9); /* Półprzezroczysty biały background */
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
    display: flex; /* Użycie flexbox */
    flex-direction: column; /* Rozmieszczenie elementów w kolumnach */
    align-items: stretch; /* Elementy zajmują całą szerokość kontenera */
}

h2 {
    text-align: center;
    color: #333;
}

label {
    display: block;
    margin-top: 1em;
    color: #555;
}

input {
    width: 100%;
    padding: 0.5em;
    margin-top: 0.5em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.register-submit {
    width: 100%; /* Przycisk zajmuje 100% szerokości kontenera */
    padding: 0.7em;
    margin-top: 1em;
    background-color: #DAA520; /* Синий цвет фона для кнопки */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.register-submit:hover {
    background-color: #A17A18; /* Более темный синий при наведении */
}

/* Ikony społecznościowe */
.social-register {
    text-align: center;
    margin-top: 1em;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1em;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
    text-decoration: none; /* Usuń podkreślenie */
}

/* Linki do logowania i resetowania hasła */
.extra-links {
    text-align: center;
    margin-top: 1em;
}

.extra-links a {
    color: #DAA520; /* Синий цвет для ссылок */
    text-decoration: none;
    margin: 0 0.5em;
    font-size: 0.9em;
}

.extra-links a:hover {
    text-decoration: underline; /* Подчеркивание при наведении */
}


/* Стиль контейнера для пароля и кнопки */
.password-container {
    position: relative;
    display: flex;
    align-items: center; /* Центрируем элементы по вертикали */
}

.password-toggle {
    position: absolute;
    bottom: 6px;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.password-toggle i {
    color: #888;
    font-size: 1.2em;
}

.register-message {
    font-size: 18px; /* Увеличиваем размер шрифта */
    margin-top: 20px;  /* Добавляем отступы сверху и снизу */
    padding: 10px;   /* Добавляем внутренние отступы для улучшения внешнего вида */
    background-color: #f4f4f4; /* Добавляем светлый фон */
    border: 1px solid #ccc; /* Добавляем границу для выделения */
    border-radius: 5px; /* Скругляем углы */
    color: #DAA520; /* Цвет текста */
    text-align: center;
  }

  #username-status {
    margin-top: 1em;
    font-size: 0.75em; /* Make the text smaller */
    color: #555; /* Keep the text color default */
  }     

  #email-status {
    margin-top: 1em;
    font-size: 0.75em; /* Make the text smaller */
    color: #555; /* Keep the text color default */
  }
  .password-status {
    margin-top: 1em;
    font-size: 0.75em; /* Make the text smaller */
    color: #555; /* Keep the text color default */
  }
  
  .password-checks {
    display: flex;
    justify-content: space-between;
  }
  
  .password-checks ul {
    list-style-type: none;
    padding-left: 0;
    width: 48%; /* Set two columns with space between them */
  }
  
  .password-checks li {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .password-status .valid {
    /* Remove color style for valid condition */
    color: inherit;
  }
  
  .password-status .invalid {
    /* Remove color style for invalid condition */
    color: inherit;
  }
  
  .password-status .icon {
    font-weight: bold;
    margin-left: 10px;
    font-size: 1.2em; /* Increase icon size */
  }
 

  /* Стили для кнопки, когда она неактивна */
.register-submit:disabled {
    background-color: #ccc; /* Тусклый цвет фона */
    color: #999; /* Тусклый цвет текста */
    cursor: not-allowed; /* Убираем курсор для неактивной кнопки */
    border: 1px solid #aaa; /* Тусклая граница */
    box-shadow: none; /* Убираем тень */
}

/* Стили для активной кнопки */
.register-submit:not(:disabled) {
    background-color: #DAA520; /* Цвет фона при активации */
    color: white; /* Цвет текста */
    border: none; /* Убираем границу */
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1); /* Тень при наведении */
    cursor: pointer;
}

/* Стили для кнопки при наведении */
.register-submit:hover:not(:disabled) 
{    
    background-color: #A17A18; /* Более темный синий цвет при наведении */
}

.back-button-container {
  position: absolute;
  top: 10px;
  left: 10px;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #f0f0f0;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: #333;
  font-size: 18px;
  transition: background-color 0.3s, color 0.3s;
}

.back-button:hover {
  background-color: #ddd;
  color: #000;
}

@media (max-width: 400px) {
  .register-container {
      width: 70%; /* Reduce the width for smaller screens */
      padding: 1em; /* Reduce padding */
      font-size: 0.9em; /* Decrease overall font size */
  }

  h2 {
      font-size: 1.2em; /* Reduce header size */
  }

  label {
      font-size: 0.8em; /* Reduce label font size */
  }

  input {
      padding: 0.4em; /* Reduce input padding */
      font-size: 0.9em; /* Reduce input font size */
  }

  .register-submit {
      padding: 0.6em; /* Reduce button height */
      font-size: 0.9em; /* Reduce button text size */
  }

  .social-register {
      margin-top: 0.8em; /* Reduce top margin */
  }

  .social-icons a {
      width: 30px; /* Decrease icon size */
      height: 30px;
      font-size: 1em; /* Decrease icon text size */
  }

  .extra-links {
      font-size: 0.8em; /* Reduce link font size */
  }

  .register-message {
      font-size: 0.9em; /* Reduce message text size */
      padding: 8px; /* Reduce padding */
  }

  button[type="submit"] {
      padding: 0.6em; /* Reduce button padding */
      font-size: 0.9em; /* Reduce button font size */
  }

  .password-container {
      flex-direction: column; /* Stack password elements vertically */
  }

  .password-toggle {
      bottom: 4px;
      right: 8px;
  }

  .password-checks ul {
      font-size: 0.8em; /* Reduce password check text size */
  }

  .back-button {
      width: 35px; /* Reduce back button size */
      height: 35px;
      font-size: 16px;
  }
}
