/* Подключение шрифтов (Roboto как в main.css) */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* Сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Общий стиль для текста */
body {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    color: #fff;
}

/* Попапы */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.popup-content {
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.95), rgba(54, 68, 77, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 450px;
    color: white;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease-out;
    position: relative;
    font-family: "Roboto", sans-serif;
}

.popup-content h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group select option {
    background-color: #2c2c2c;
    color: white;
}

/* Кнопки — как "Войти" и "Регистрация" */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.form-buttons button {
    flex: 1;
    padding: 9px 17px; /* как в index.html */
    border-radius: 8px;
    transition: all 500ms ease;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    flex: 0 0 auto;
}

/* Основная кнопка */
.form-buttons button[type="submit"] {
    background: #2C2C2C;
    color: #fff;
}

.form-buttons button[type="submit"]:hover {
    background: #5a5a5a;
}

/* Вторичная кнопка (отмена) */
.form-buttons button[type="button"] {
    background: #2C2C2C;
    color: #fff;
}

.form-buttons button[type="button"]:hover {
    background: #5a5a5a;
}

.form-divider {
  margin-top: 32px; /* регулируешь сколько нужно */
}

#forgotPasswordLink {
  font-family: "Roboto", sans-serif; /* как у кнопки */
  font-size: 16px;                   /* тот же размер */
  font-weight: 500;                  /* тот же вес */
  color: white;
  text-decoration: none;
  cursor: pointer;
  margin-top: 8px;
}

#forgotPasswordLink:hover {
  text-decoration: underline;
}

/* Ошибки */
.error-message {
    color: #ff6b6b;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Кнопка загрузки фото */
.photo-upload {
  text-align: center;
  margin-bottom: 25px;
}

.photo-btn {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #2C2C2C;
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.photo-btn:hover {
  background: #444;
}

.photo-text {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

/* Попап для фото */
.photo-popup {
  max-width: 600px;
  text-align: center;
}


/* Адаптив */
@media (max-width: 768px) {
    .popup-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .popup-content h2 {
        font-size: 20px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .form-buttons button {
        margin-bottom: 10px;
    }
}
/* тосты */
.toast-container {
    position: fixed;
    top: 20px; /* Было: top: 20px */
    left: 50%; /* Было: right: 20px */
    transform: translate(-50%, -50%); /* Центрируем */
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.toast.error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.toast.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation: progress 3s linear;
}

@keyframes slideIn {
    from {
    transform: translateX(400px);
    opacity: 0;
    }
    to {
    transform: translateX(0);
    opacity: 1;
    }
}

@keyframes slideOut {
    from {
    transform: translateX(0);
    opacity: 1;
    }
    to {
    transform: translateX(400px);
    opacity: 0;
    }
}

@keyframes progress {
    from {
    width: 100%;
    }
    to {
    width: 0%;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease-out forwards;
}