/* ==================== REGISTRATION & LOGIN MODAL ==================== */

/* Модальный контейнер для регистрации и входа */
.registration-modal {
    max-width: 480px;
    width: 90%;
    padding: 0;
}

/* Контент модального окна */
.registration-content {
    padding: 32px;
}

/* Заголовок и описание */
.registration-message {
    text-align: center;
    margin-bottom: 28px;
}

.registration-message h3 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.registration-message p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Форма */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Группа полей */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

/* Поля ввода */
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    transition: all 0.2s ease;
    background: #fff;
    color: #1a1a1a;
    box-sizing: border-box;
}

.form-input:hover {
    border-color: #c0c0c0;
}

.form-input:focus {
    outline: none;
    border-color: #5C9D7F;
    box-shadow: 0 0 0 3px rgba(92, 157, 127, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* Сообщения об ошибках */
.form-error {
    font-size: 13px;
    color: #e74c3c;
    font-weight: 500;
    margin-top: 4px;
    min-height: 0;
    display: none;
    animation: slideDown 0.2s ease;
}

.form-error.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Кнопка отправки */
.registration-submit {
    width: 100%;
    margin-top: 8px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #5C9D7F 0%, #4a8c6f 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(92, 157, 127, 0.3);
}

.registration-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 157, 127, 0.4);
}

.registration-submit:active:not(:disabled) {
    transform: translateY(0);
}

.registration-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Примечание внизу формы */
.registration-note {
    font-size: 13px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin-top: 16px;
}

.registration-note a {
    color: #5C9D7F;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.registration-note a:hover {
    color: #4a8c6f;
    text-decoration: underline;
}

/* ==================== AUTH BUTTONS IN HEADER ==================== */

.nav-login {
    display: inline-block;
    padding: 7px 28px;
    background: linear-gradient(135deg, #5C9D7F 0%, #4a8c6f 100%);
    color: white;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    border: none;
    box-shadow: 0 4px 20px rgba(92, 157, 127, 0.25);
}

.nav-login:hover {
    background: linear-gradient(135deg, #4a8c6f 0%, #3d7a5e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(92, 157, 127, 0.35);
}

.nav-login:active {
    transform: translateY(0);
}

.nav-logout {
    padding: 10px 20px;
    background: #e74c3c;
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nav-logout:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.nav-logout:active {
    transform: translateY(0);
}

.nav-dashboard {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #5C9D7F;
    color: #5C9D7F;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nav-dashboard:hover {
    background: #5C9D7F;
    color: white;
    transform: translateY(-1px);
}

.nav-dashboard:active {
    transform: translateY(0);
}

.user-email {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
    padding: 8px 12px;
    background: #f5f5f0;
    border-radius: 8px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .registration-modal {
        max-width: 95%;
        width: 95%;
    }
    
    .registration-content {
        padding: 24px 20px;
    }
    
    .registration-message h3 {
        font-size: 22px;
    }
    
    .registration-message p {
        font-size: 14px;
    }
    
    .form-input {
        font-size: 16px; /* Предотвращает zoom на iOS */
    }
    
    .registration-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .nav-login,
    .nav-logout {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .user-email {
        display: none;
    }
}

@media (max-width: 480px) {
    .registration-content {
        padding: 20px 16px;
    }
    
    .registration-message {
        margin-bottom: 24px;
    }
    
    .registration-message h3 {
        font-size: 20px;
    }
    
    .form-group {
        gap: 6px;
    }
    
    .registration-form {
        gap: 16px;
    }
}

/* Улучшение читаемости на темном фоне оверлея */
.modal-overlay {
    backdrop-filter: blur(4px);
}
