* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f4f4f4;
    border-bottom: 2px solid #ddd;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.menu {
    display: flex;
    gap: 20px;
}

.menu a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.icons {
    display: flex;
    gap: 20px;
    align-items: center;
    cursor: pointer;
}

.icons .icon {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.icons .icon i {
    font-size: 18px;
}

/* Стили для модального окна */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    margin: 10% auto;
    width: 90%;
    border-radius: 5px;
    position: relative;
    max-width: 500px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
    user-select: none;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

input {
    padding: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#message {
    padding: 10px 0;
}

button {
    padding: 10px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Стили для переключения между формами */
#switchToRegister, #switchToLogin {
    color: #4CAF50;
    cursor: pointer;
    text-decoration: underline;
}

/* Затемнение фона вокруг окна */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.3s ease-in-out;
}

/* Само модальное окно */
.error-modal {
    background-color: #fff0f0;
    border: 1px solid #f44336;
    border-left: 6px solid #f44336;
    border-radius: 10px;
    padding: 20px 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease-in-out;
}

/* Контент сообщения */
.error-modal-content {
    color: #b71c1c;
    font-size: 15px;
    font-weight: 500;
}

/* Кнопка закрытия */
.error-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 22px;
    color: #b71c1c;
    cursor: pointer;
}


.styled-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 12px;
  color: #888;
  font-size: 14px;
  top: 12px;
}

.input-wrapper input {
  width: 100%;
  padding: 10px 10px 10px 36px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input-wrapper input:focus {
  border-color: #3498db;
}

select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  outline: none;
}

.form-button {
  padding: 12px;
  background-color: #2ecc71;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-button:hover {
  background-color: #27ae60;
}




/* Анимации */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}
